forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


"@Childexists()" function

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Dec 13, 2003 3:15 pm    Post subject: "@Childexists()" function Reply with quote

Hello,

I've made a little function for VDS 5, so that you can lookup the identifier of a child window. This can't be done using @winexists() directly, so that's why I made this code. You can specify the parent window by it's class name, it's identifier or his caption. The child can only be specified by his class name. I hope you can use this... Smile

Code:

#define function,Childexists

# Usage: @Childexists( [Parent Window Class, Identifier or Caption] , [Child Window Class] )

# With the Parent Window Class...
info @Childexists(#TMainWin,#TSyntaxMemo)

# With the Parent Window Identifier...
info @Childexists(@winexists(#TMainWin),#TSyntaxMemo)

# With the Parent Window Caption...
info @Childexists(@wintext(#TMainWin),#TSyntaxMemo)

exit


:Childexists

  if @null(%1)@null(%2)
    exit
    end

  if @equal(@substr(%2,1,1),"#")
    %2 = @substr(%2,2,@len(%2))
    end

  if @equal(@substr(%1,1,1),"%")
    %1 = @winclass(%1)
    if @unequal(%1,)
      %1 = "#"%1
      end
    end

  if @both(@unequal(@substr(%1,1,1),"%"),@unequal(@substr(%1,1,1),"#"))
    %1 = @winclass(@winexists(%1))
    if @unequal(%1,)
      %1 = "#"%1
      end
    end
   
  repeat
    %1 = @window(%1,CHILD)
    if @equal(@trim(%1),)
      %1 = " "
      end
  until @equal(@winclass(%1),%2)@equal(%1," ")@equal(%1,"CHILD)")

  if @equal(%1," ")@equal(%1,"CHILD)")
    exit
    end
   
  exit %1

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Dec 13, 2003 10:43 pm    Post subject: Reply with quote

Nice. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group