About Press Down * nDx

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Tetsuo
Pro Scripter
Posts: 53
Joined: Sun Dec 04, 2005 11:52 pm
Location: Japan

About Press Down * nDx

Post by Tetsuo » Tue Mar 14, 2006 9:41 am

I'm currently learning how to use GetListItem command from the help file, and have one question.

Below is an excerpt from the help file.

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

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

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

//Select it
Press Home
Press Down * nDx

WaitReady>0

//OK!
Press Enter
Can someone explain to me what "Press Down *nDx" is supposed to do?
It is written that this command, together with Press Home, is supposed to select the item in the ListView object, but what I want to know is what "nDx" means.
I also want to know if "Press Down" a command different from "Press..." command.

Thank you.

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

Post by Marcus Tettmar » Tue Mar 14, 2006 12:43 pm

Look at the GetListItem line of code. nDx is the return variable for GetListItem. So Press Down * nDx will press down however many times is indicated by nDx. If nDx is 5 (i.e. the list item is the 5th one) then the Down key will be pressed 5 times.
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
Sign up to our newsletter for free automation tips, tricks & discounts