| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Feb 26, 2004 12:16 am Post subject: Can anyone use wildcards in @winexists(*program) |
|
|
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 26, 2004 12:32 am Post subject: |
|
|
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.
Cheers, Mac  _________________ 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 |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Feb 26, 2004 1:01 am Post subject: |
|
|
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 [/code:1:579c0ad8ac] |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 26, 2004 1:16 am Post subject: |
|
|
Just omit the @equal() function - it's comparing the partial
search title to the complete title in @item(1).
| 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  _________________ 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 |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Feb 26, 2004 1:32 am Post subject: |
|
|
Thanks Mac, guess I was having a bad day, lol
Thanks again.. works great (appreciate it) |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 26, 2004 1:39 am Post subject: |
|
|
You're welcome.
And don't feel lonesome - I've gone nearly cross-eyed
before trying to find a prob caused by simpler mistakes
than this one...
Cheers, Mac  _________________ 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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Feb 26, 2004 9:00 pm Post subject: |
|
|
Also, unrelated to your question, in your code you seem to do:
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 |
|
 |
|