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 


Can anyone use wildcards in @winexists(*program)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Feb 26, 2004 12:16 am    Post subject: Can anyone use wildcards in @winexists(*program) Reply with quote

I was thinking of trying to use @substr() or something simular.
Or maybe I just missed some easy way. lol
Any help would be highly appreciated. Thanks in advance.
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 26, 2004 12:32 am    Post subject: Reply with quote

You can use LIST WINLIST to get a list of all open windows,
then use @match() to search for a certain title or partial title. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Feb 26, 2004 1:01 am    Post subject: Reply with quote

The program example I need to find would be:
Furious.lnd - EditWorld
The Furious part changes names all the time.
I need to find out the line number that 'EditWorld' is on and get the entire line in my script.

Code:


LIST CREATE,1
LIST WINLIST,1
%%search = EditWorld
if @match(1,%%search)
  if @equal(@item(1),%%search)
  INFO success
  end
end
 
:close
LIST CLOSE,1
end
stop
exit



I can't seem to get Match to do what I want, lol
PLease help Mac Rolling Eyes [/code:1:579c0ad8ac]
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 26, 2004 1:16 am    Post subject: Reply with quote

Just omit the @equal() function - it's comparing the partial
search title to the complete title in @item(1). Wink
Code:

LIST CREATE,1
LIST WINLIST,1

%%search = EditWorld

if @match(1, %%search)
   %%title = @item(1)
   INFO Title is:@cr()@cr()%%title
end

:CLOSE
  exit


Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Feb 26, 2004 1:32 am    Post subject: Reply with quote

Thanks Mac, guess I was having a bad day, lol
Thanks again.. works great (appreciate it)
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 26, 2004 1:39 am    Post subject: Reply with quote

You're welcome. Wink

And don't feel lonesome - I've gone nearly cross-eyed
before trying to find a prob caused by simpler mistakes
than this one... Laughing

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Feb 26, 2004 9:00 pm    Post subject: Reply with quote

Also, unrelated to your question, in your code you seem to do:

Code:
  end
  stop
  exit


The end should be left away as it should only be used to close "if" statements, never to
"close" the script. The "stop" command will suffice to close the script, if you use that
you won't need the "exit" command anymore.

There is a difference between stop and exit. If using stop, then your script will be closed
no matter what, even if the script is currently inside a "gosub" label. If using exit the
script will only be closed if it wasn't inside a gosub label, otherwise the gosub routine will
be ended but the script wouldn't be closed.

So use either stop or exit and not both.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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