GetListItem won't work with combobox?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Hoa
Newbie
Posts: 12
Joined: Mon May 29, 2006 5:33 am

GetListItem won't work with combobox?

Post by Hoa » Fri Jun 02, 2006 6:48 am

Hi support,

I looked at the sample code in Macro Scheduler Help file (under GetListItem) and tested out. The code would work fine with the listbox but when I tried to modified the code with the combobox the computer locked up at me. So, I had to close Macro Scheduler via the Task Manager.

Here is the code:

//Open Display Properties
Run>rundll32 shell32.dll,Control_RunDLL Desk.cpl
WaitWIndowOpen>Display Properties

//Select Desktop Tab
Press CTRL
Press TAB
Press TAB
Release CTRL
WaitReady>0

//Get listindex of "Azul" in Background box
GetListItem>Display Properties,Combobox,0,Blank Screen,0,0,0,nDx,lvHwnd

//Select it
Press Home
Press Down * nDx

WaitReady>0

//OK!
Press Enter


My question is .... Can the GetListItem be used with a combobox control?

thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jun 02, 2006 7:40 am

On my system the entry is just called "Blank" not "Blank Screen" and it is Combobox instance 1 not instance 0. Macro Scheduler doesn't hang up, but it doesn't seem to be able to "see" this combo box either.

Anyway, if all you want to do is Select "Blank Screen" just do this:

//Open Display Properties
Run>rundll32 shell32.dll,Control_RunDLL Desk.cpl
WaitWIndowOpen>Display Properties

//Select Desktop Tab
Press CTRL
Press TAB
Press TAB
Release CTRL
WaitReady>0

//Select it:
Send>Blank Screen
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts