Is there a command that would allow me to do the following:
[code]
GetActiveWindow>title,X,Y
If>title contains the word "Mozzilla"
//do something
else
//do something else
endif
[/code]
if window title contains a word
Moderators: Dorian (MJT support), JRL
I like to search for text using Separate>
This will be a case sensitive search.
This will be a case sensitive search.
Code: Select all
GetActiveWindow>title,X,Y
//If>title contains the word "Mozzilla"
Separate>%title%,Mozzilla,var
If>%var_count%>1
//do something
else
//do something else
endif
Great! This works perfectly; however, i am not understanding something.
Help file says, "Also returned is the number of elements in the list, in returnvar_count."
In the code you provided, why is the var_count returning a value of 2?
EDIT: I misspelled the word "Mozilla" above; so don't be confused if the code doesn't work for you. Correct the spelling and all is well.
Help file says, "Also returned is the number of elements in the list, in returnvar_count."
In the code you provided, why is the var_count returning a value of 2?
EDIT: I misspelled the word "Mozilla" above; so don't be confused if the code doesn't work for you. Correct the spelling and all is well.
If you separate the window title text:
Windows Scripting, Windows Macro Automation, Windows Macro Recorder - Automate your PC for Windows 9x/NT/ME/2000/XP/Vista :: View topic - if window title contains a word - Mozilla Firefox
using Mozilla as the separator you will get two variables with the values
var_1=Windows Scripting, Windows Macro Automation, Windows Macro Recorder - Automate your PC for Windows 9x/NT/ME/2000/XP/Vista :: View topic - if window title contains a word -
var_2= Firefox
also giving you a count var_count=2
Windows Scripting, Windows Macro Automation, Windows Macro Recorder - Automate your PC for Windows 9x/NT/ME/2000/XP/Vista :: View topic - if window title contains a word - Mozilla Firefox
using Mozilla as the separator you will get two variables with the values
var_1=Windows Scripting, Windows Macro Automation, Windows Macro Recorder - Automate your PC for Windows 9x/NT/ME/2000/XP/Vista :: View topic - if window title contains a word -
var_2= Firefox
also giving you a count var_count=2
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: