mr-es335 Posted 13 hours ago Posted 13 hours ago (edited) Good day, My truly sincerest apologies for this one...but can someone please assist me in getting started with the example... expandcollapse popup; ----------------------------------------------- #include <AutoItConstants.au3> ; ----------------------------------------------- Global $iTimeOut = 100 Global $hSAWSTUDIO_MAIN = "CLASS:SAWSTUDIO_MAIN" ; ----------------------------------------------- Example() ; ----------------------------------------------- Func Example() Item1() OtherItems() EndFunc ;==>Example ; ----------------------------------------------- Func Item1() WinActivate($hSAWSTUDIO_MAIN) ; ----------------------------------------------- Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 360, 180, 1, 0) ; FOR TESTING ONLY!! ; ------------------------- Send("{F2}") ; Select item > Custom Cmds > Add ; 1st Item Sleep($iTimeOut) Send("{UP}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") EndFunc ;==>Item1 ; ----------------------------------------------- Func OtherItems() ; Select item > Custom Cmds > Add ; 2nd Item Sleep($iTimeOut) Send("{HOME}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") ; ------------------------- ; 3rd Item Sleep($iTimeOut) Send("{DOWN}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") ; ------------------------- ; 4th Item Sleep($iTimeOut) Send("{DOWN}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") ; ------------------------- ; 5th Item Sleep($iTimeOut) Send("{DOWN}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") EndFunc ;==>OtherItems ; ----------------------------------------------- As can be observed in the "OtherItems()" function, there are multiple items that require being added to a list. • Though the above example shown 5 items, there are in total 32 items! • Thus, I would require 31 iterations for this listing...from Item 2 to Item 32. Any assistance in this matter would be greatly appreciated! Edited 12 hours ago by mr-es335 mr-es335 Sentinel Music Studios
ioa747 Posted 12 hours ago Posted 12 hours ago (edited) Func OtherItems() ; 2nd Item ConsoleWrite("2) Item -----" & @CRLF) Sleep($iTimeOut) Send("{HOME}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") For $i = 3 to 32 ConsoleWrite($i & ") Item -----" & @CRLF) Sleep($iTimeOut) Send("{DOWN}") Sleep($iTimeOut) MouseClick($MOUSE_CLICK_LEFT, 250, 378, 1, 0) Sleep($iTimeOut) Send("{DOWN}+{ENTER}") Next EndFunc ;==>OtherItems Edited 10 hours ago by ioa747 correction I know that I know nothing
Werty Posted 11 hours ago Posted 11 hours ago @ioa747, maybe you (or copilot) overlooked something, it's only in the 2nd item he has {HOME}, in the other 3 he has {DOWN}. Or is it me who is overlooking something. 😛 Some guy's script + some other guy's script = my script!
ioa747 Posted 10 hours ago Posted 10 hours ago 1 hour ago, Werty said: Or is it me who is overlooking something You saw it well. 👀 I know that I know nothing
mr-es335 Posted 9 hours ago Author Posted 9 hours ago (edited) Hello, 1) As noted, there is a list of 32 items. 2) As the list terminates on the last entry, I need to go to the top of the list - via Send("{HOME}") 3) At this point, the Func Item1() selects the first item as this function employs the initial Home command. 4) Items 2-32 are identical in operation. In launching the provided example script, I am getting duplicate output of the top 3 items? Also. the example script includes two functions - when I do believe that I only require one - one of Item 1, and one for items 2 to 32. PS: Just for completeness, the end result of this script is to create a 2nd list of the data. Edited 8 hours ago by mr-es335 mr-es335 Sentinel Music Studios
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now