Hoth2001

For Loop Meltdown

7 posts in this topic

#1 ·  Posted (edited)

My newbie self is proud to have actually written up a bunch of lines of code.

Here is a snippet...
 

Global $aArray
_FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")


Run("C:\Users\User\Desktop\Ingabo HP computer\Desktop\Techsignal\CPM\CelestialPriceMoves.UI.exe")
WinWait('Celestial Price Moves    (Current Version: 1.3.14, Release Date: 03/08/2014)')
WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")
Sleep(4000)

AutoItSetOption('MouseCoordMode' , 0)
AutoItSetOption('SendKeyDelay', 10)



;SECOND MERCURY CALCULATION PLANET

            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MERCIURY IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(521,396,50)
            MouseClick('primary', 521,396, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[2][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[2][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[2][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")


            ;FIRST VENUS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[3][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[3][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[3][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")

The code basically repeats more of the same for another 300 lines.

And the code runs exactly as I hoped it would.

UNTIL......

 

I want to loop through all of the lines of code (400+ lines)

so I slapped a good ol' FOR loop at the beginning of the code

and then a NEXT at the end.

I set the number of times to iterate through the code from an inputbox prompt that i input a numberr to toggle how many times I want to loop the code at each run

And when I run it......it doesn't do as I had hoped (loop through line of code 1- 400 and then start over from the top)

It instead goes through the code once...and then does a bunch of unexpected stuff at the end...errors....and bings

 

Ummm...any clue as to why it wouldn't work?

Is there some syntax error I'm not aware of?

 

Here is all damn code..........to best understand and pinpoint where my error is

#RequireAdmin
#include<file.au3>
#include<Excel.au3>

;~ ; To Find Out How may ASsets/Loops are going to be done
$oNumAssets = InputBox("Pre Analysis Asset Count","How many different assets do you want analyed?")


Global $aArray
_FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")


Run("C:\Users\User\Desktop\Ingabo HP computer\Desktop\Techsignal\CPM\CelestialPriceMoves.UI.exe")
WinWait('Celestial Price Moves    (Current Version: 1.3.14, Release Date: 03/08/2014)')
WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")
Sleep(4000)

AutoItSetOption('MouseCoordMode' , 0)
AutoItSetOption('SendKeyDelay', 10)

;Set the Initial Parameters in CPM for "Forward Test Date" and Having 1,3,5 highlighted

MouseClick('primary', 273,130, 1, 0)
Sleep(500)
MouseClick('primary', 596,66, 1, 0)
Sleep(500)
MouseClick('primary', 668,63, 1, 0)
Sleep(500)

;Begin the Process of doing a full automated CPM Run

MouseClick('primary', 563,212, 1, 0)
Sleep(500)

MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 710,230, 1, 0)
Sleep(500)
MouseClick('primary', 207, 156, 1, 0)
Sleep(1000)
;Set Degree Step
MouseClick('primary', 194, 207, 1, 0)
Sleep(1000)
Send("{DELETE}")
Send("{DELETE}")
Send("{DELETE}")
sleep(500)
Send("5.0")
sleep(500)

For $i = 1 To $oNumAssets


            ;FIRST CYCLE THROUGH FIRST CYCLE THROUGH FIRST CYCLE THROUGH

            ;PRICE FILE LOCATION
            MouseClick('primary', 194, 207, 1, 0)
            Sleep(1000)
            Send("{TAB}")
            Send($aArray[1][0])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;PLANETARY DATA FILE LOCATION
            Send("{DELETE}")
            Send($aArray[1][1])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][2])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; FORECAST CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][3])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; TRANSIT BODY (PLANET)
            MouseClick('primary', 585,210, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send($aArray[1][4])
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            MouseClick('primary', 320,156, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send("{DELETE}")
            Send("{DELETE}")
            sleep(200)

            Send($aArray[1][5])

            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION DATE RANGE Starting with Month

            Send($aArray[1][6])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][7])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][8])
            Send("{TAB}")

            ;month
            Send($aArray[1][9])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][10])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][11])
            Send("{TAB}")

            ;~ ;FORECAST CALCULATION DATE RANGE

            ;month
            Send($aArray[1][12])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][13])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][14])
            Send("{TAB}")

            ;month
            Send($aArray[1][15])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][16])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][17])
            Send("{TAB}")

            ;FORWARD TEST DATE

            ;month
            Send($aArray[1][18])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][19])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][20])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ;SAVE SETTINGS
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 455,171, 1, 0)
            Sleep(1000)
            ;Most likely will need to add code to have more control regarding save destination
            WinWait("Save As")
            MouseClick('primary', 139,375, 1, 0)
            Send($aArray[1][21])
            sleep(1000)

            MouseClick('primary', 520,447, 1, 0)
            sleep(1000)
            Send("{ENTER}")
            sleep(1000)

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")

            ;~ ;SECOND CYCLE THROUGH SECOND CYCLE THROUGH SECOND CYCLE THROUGH

            ;SECOND MERCURY CALCULATION PLANET

            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MERCIURY IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(521,396,50)
            MouseClick('primary', 521,396, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[2][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[2][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[2][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")


            ;FIRST VENUS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[3][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[3][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[3][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;SECOND VENUS CALCULATION(PLANET)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[4][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[4][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[4][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;FIRST MARS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[5][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[5][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[5][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;SECOND MARS CALCULATION(PLANET)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[6][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[6][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[6][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;FIRST JUPITER CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[7][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[7][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[7][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")


            ;SECOND JUPITER CALCULATION(PLANET)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[8][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[8][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[8][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")

            ;MOON CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MOON IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(530,410,50)
            MouseClick('primary', 530,410, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[9][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[9][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[9][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")

            Local $oExcel_1 = _Excel_Open()
            Local $sWorkbook = "C:\Users\User\Desktop\CPMautomatorTest.csv"
            Local $oWorkbook = _Excel_BookOpen($oExcel_1,$sWorkbook)
            sleep(10000)

            Local $result = _Excel_RangeDelete($oWorkbook.Worksheets("CPMAutomatorTest"), "2:10") ;Deletes Rows 2 to 10 on Sheet1
            sleep(10000)

            Local $Save = _Excel_BookSave($oWorkbook)
            sleep(10000)

            Local $close = _Excel_Close($oExcel_1)
            sleep(10000)
            _FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")
            sleep(10000)


Next

 

Edited by Hoth2001

Share this post


Link to post
Share on other sites



;#RequireAdmin
#include<file.au3>
#include<Excel.au3>
Local $oNumAssets
Begin()

Func Begin()
;~ ; To Find Out How may ASsets/Loops are going to be done
$oNumAssets = InputBox("Pre Analysis Asset Count","How many different assets do you want analysed?")
If @error = 1 Then Exit
#cs
Global $aArray
_FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")


Run("C:\Users\User\Desktop\Ingabo HP computer\Desktop\Techsignal\CPM\CelestialPriceMoves.UI.exe")
WinWait('Celestial Price Moves    (Current Version: 1.3.14, Release Date: 03/08/2014)')
WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")
Sleep(4000)

AutoItSetOption('MouseCoordMode' , 0)
AutoItSetOption('SendKeyDelay', 10)

;Set the Initial Parameters in CPM for "Forward Test Date" and Having 1,3,5 highlighted

MouseClick('primary', 273,130, 1, 0)
Sleep(500)
MouseClick('primary', 596,66, 1, 0)
Sleep(500)
MouseClick('primary', 668,63, 1, 0)
Sleep(500)

;Begin the Process of doing a full automated CPM Run

MouseClick('primary', 563,212, 1, 0)
Sleep(500)

MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 710,230, 1, 0)
Sleep(500)
MouseClick('primary', 207, 156, 1, 0)
Sleep(1000)
;Set Degree Step
MouseClick('primary', 194, 207, 1, 0)
Sleep(1000)
Send("{DELETE}")
Send("{DELETE}")
Send("{DELETE}")
sleep(500)
Send("5.0")
sleep(500)
#CE
Loop()
EndFunc

Func Loop()
For $i = 1 To $oNumAssets
#CS
            ;FIRST CYCLE THROUGH FIRST CYCLE THROUGH FIRST CYCLE THROUGH

            ;PRICE FILE LOCATION
            MouseClick('primary', 194, 207, 1, 0)
            Sleep(1000)
            Send("{TAB}")
            Send($aArray[1][0])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;PLANETARY DATA FILE LOCATION
            Send("{DELETE}")
            Send($aArray[1][1])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][2])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; FORECAST CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][3])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; TRANSIT BODY (PLANET)
            MouseClick('primary', 585,210, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send($aArray[1][4])
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            MouseClick('primary', 320,156, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send("{DELETE}")
            Send("{DELETE}")
            sleep(200)

            Send($aArray[1][5])

            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION DATE RANGE Starting with Month

            Send($aArray[1][6])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][7])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][8])
            Send("{TAB}")

            ;month
            Send($aArray[1][9])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][10])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][11])
            Send("{TAB}")

            ;~ ;FORECAST CALCULATION DATE RANGE

            ;month
            Send($aArray[1][12])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][13])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][14])
            Send("{TAB}")

            ;month
            Send($aArray[1][15])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][16])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][17])
            Send("{TAB}")

            ;FORWARD TEST DATE

            ;month
            Send($aArray[1][18])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][19])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][20])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ;SAVE SETTINGS
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 455,171, 1, 0)
            Sleep(1000)
            ;Most likely will need to add code to have more control regarding save destination
            WinWait("Save As")
            MouseClick('primary', 139,375, 1, 0)
            Send($aArray[1][21])
            sleep(1000)

            MouseClick('primary', 520,447, 1, 0)
            sleep(1000)
            Send("{ENTER}")
            sleep(1000)

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")

            ;~ ;SECOND CYCLE THROUGH SECOND CYCLE THROUGH SECOND CYCLE THROUGH

            ;SECOND MERCURY CALCULATION PLANET

            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MERCIURY IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(521,396,50)
            MouseClick('primary', 521,396, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[2][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[2][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[2][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")


            ;FIRST VENUS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[3][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[3][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[3][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;SECOND VENUS CALCULATION(PLANET)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[4][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[4][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[4][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;FIRST MARS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[5][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[5][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[5][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;SECOND MARS CALCULATION(PLANET)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[6][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[6][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[6][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;FIRST JUPITER CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[7][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[7][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[7][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")


            ;SECOND JUPITER CALCULATION(PLANET)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[8][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[8][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[8][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")

            ;MOON CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MOON IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(530,410,50)
            MouseClick('primary', 530,410, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[9][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[9][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[9][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")

            Local $oExcel_1 = _Excel_Open()
            Local $sWorkbook = "C:\Users\User\Desktop\CPMautomatorTest.csv"
            Local $oWorkbook = _Excel_BookOpen($oExcel_1,$sWorkbook)
            sleep(10000)

            Local $result = _Excel_RangeDelete($oWorkbook.Worksheets("CPMAutomatorTest"), "2:10") ;Deletes Rows 2 to 10 on Sheet1
            sleep(10000)

            Local $Save = _Excel_BookSave($oWorkbook)
            sleep(10000)

            Local $close = _Excel_Close($oExcel_1)
            sleep(10000)
            _FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")
            sleep(10000)
#CE
ConsoleWrite('Looping - '&@MSEC&@CRLF)
Next
Begin()
EndFunc
;=============================================================================
While 1
    Sleep(100)
WEnd

 


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

Thanks! I'm going to try and test it now.

 

IN meantime...what  do all those  #CE  mean?

1 hour ago, careca said:
;#RequireAdmin
#include<file.au3>
#include<Excel.au3>
Local $oNumAssets
Begin()

Func Begin()
;~ ; To Find Out How may ASsets/Loops are going to be done
$oNumAssets = InputBox("Pre Analysis Asset Count","How many different assets do you want analysed?")
If @error = 1 Then Exit
#cs
Global $aArray
_FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")


Run("C:\Users\User\Desktop\Ingabo HP computer\Desktop\Techsignal\CPM\CelestialPriceMoves.UI.exe")
WinWait('Celestial Price Moves    (Current Version: 1.3.14, Release Date: 03/08/2014)')
WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")
Sleep(4000)

AutoItSetOption('MouseCoordMode' , 0)
AutoItSetOption('SendKeyDelay', 10)

;Set the Initial Parameters in CPM for "Forward Test Date" and Having 1,3,5 highlighted

MouseClick('primary', 273,130, 1, 0)
Sleep(500)
MouseClick('primary', 596,66, 1, 0)
Sleep(500)
MouseClick('primary', 668,63, 1, 0)
Sleep(500)

;Begin the Process of doing a full automated CPM Run

MouseClick('primary', 563,212, 1, 0)
Sleep(500)

MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 709,212, 1, 0)
Sleep(500)
MouseClick('primary', 710,230, 1, 0)
Sleep(500)
MouseClick('primary', 207, 156, 1, 0)
Sleep(1000)
;Set Degree Step
MouseClick('primary', 194, 207, 1, 0)
Sleep(1000)
Send("{DELETE}")
Send("{DELETE}")
Send("{DELETE}")
sleep(500)
Send("5.0")
sleep(500)
#CE
Loop()
EndFunc

Func Loop()
For $i = 1 To $oNumAssets
#CS
            ;FIRST CYCLE THROUGH FIRST CYCLE THROUGH FIRST CYCLE THROUGH

            ;PRICE FILE LOCATION
            MouseClick('primary', 194, 207, 1, 0)
            Sleep(1000)
            Send("{TAB}")
            Send($aArray[1][0])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;PLANETARY DATA FILE LOCATION
            Send("{DELETE}")
            Send($aArray[1][1])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][2])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; FORECAST CALCULATION RESULT FILE DESTINATION
            Send("{DELETE}")
            Send($aArray[1][3])

            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ; TRANSIT BODY (PLANET)
            MouseClick('primary', 585,210, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send($aArray[1][4])
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            MouseClick('primary', 320,156, 1, 0)
            Sleep(300)
            Send("{DELETE}")
            Send("{DELETE}")
            Send("{DELETE}")
            sleep(200)

            Send($aArray[1][5])

            Send("{TAB}")
            sleep(500)

            ;POSITIVE CALCULATION DATE RANGE Starting with Month

            Send($aArray[1][6])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][7])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][8])
            Send("{TAB}")

            ;month
            Send($aArray[1][9])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][10])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][11])
            Send("{TAB}")

            ;~ ;FORECAST CALCULATION DATE RANGE

            ;month
            Send($aArray[1][12])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][13])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][14])
            Send("{TAB}")

            ;month
            Send($aArray[1][15])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][16])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][17])
            Send("{TAB}")

            ;FORWARD TEST DATE

            ;month
            Send($aArray[1][18])
            Send("{RIGHT}")
            ;date
            Send($aArray[1][19])
            Send("{RIGHT}")
            ;year
            Send($aArray[1][20])
            Send("{TAB}")
            Send("{TAB}")
            Send("{TAB}")

            ;SAVE SETTINGS
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 455,171, 1, 0)
            Sleep(1000)
            ;Most likely will need to add code to have more control regarding save destination
            WinWait("Save As")
            MouseClick('primary', 139,375, 1, 0)
            Send($aArray[1][21])
            sleep(1000)

            MouseClick('primary', 520,447, 1, 0)
            sleep(1000)
            Send("{ENTER}")
            sleep(1000)

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")

            ;~ ;SECOND CYCLE THROUGH SECOND CYCLE THROUGH SECOND CYCLE THROUGH

            ;SECOND MERCURY CALCULATION PLANET

            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MERCIURY IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(521,396,50)
            MouseClick('primary', 521,396, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[2][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[2][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[2][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(120000)
            Send("{SPACE}")


            ;FIRST VENUS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[3][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[3][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[3][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;SECOND VENUS CALCULATION(PLANET)

            ;MOVE DOWN TO VENUS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(510,525,50)
            MouseClick('primary', 510,525, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[4][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[4][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[4][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")


            ;FIRST MARS CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)

            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[5][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[5][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[5][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;SECOND MARS CALCULATION(PLANET)

            ;MOVE DOWN TO MARS IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(522,372,50)
            MouseClick('primary', 522,372, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[6][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[6][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[6][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(300000)
            Send("{SPACE}")


            ;FIRST JUPITER CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[7][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[7][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[7][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")


            ;SECOND JUPITER CALCULATION(PLANET)

            ;MOVE DOWN TO JUPITER IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(526,359,50)
            MouseClick('primary', 526,359, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[8][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[8][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[8][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(420000)
            Send("{SPACE}")

            ;MOON CALCULATION(PLANET)
            WinActivate("Celestial Price Moves  (Current Version 1.3.14, Release Date: 03/08/2014)")

            MouseClick('primary', 563,212, 1, 0)
            Sleep(500)

            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)
            MouseClick('primary', 709,212, 1, 0)
            Sleep(500)

            ;MOVE DOWN TO MOON IN LIST
            MouseClick('primary', 563,211, 1, 0)
            MouseMove(530,410,50)
            MouseClick('primary', 530,410, 1, 0)
            Sleep(300)


            ;~ ;PLANET RATE OF CHANGE MAXIMUM
            Send("{TAB 20}")
            sleep(1000)
            Send("{BACKSPACE 3}")
            Send($aArray[9][5])

            ; NEW POSITIVE FILE SAVE
            Send("{TAB 15}")
            sleep(1000)
            Send("{BACKSPACE 200}")
            Send($aArray[9][2])

            ; NEW FORECAST FILE SAVE
            Send("{TAB 3}")
            Send("{BACKSPACE 200}")
            Send($aArray[9][3])

            ;START CPM PROGRAM
            MouseClick('primary', 693,549, 1, 0)
            sleep(180000)
            Send("{SPACE}")

            Local $oExcel_1 = _Excel_Open()
            Local $sWorkbook = "C:\Users\User\Desktop\CPMautomatorTest.csv"
            Local $oWorkbook = _Excel_BookOpen($oExcel_1,$sWorkbook)
            sleep(10000)

            Local $result = _Excel_RangeDelete($oWorkbook.Worksheets("CPMAutomatorTest"), "2:10") ;Deletes Rows 2 to 10 on Sheet1
            sleep(10000)

            Local $Save = _Excel_BookSave($oWorkbook)
            sleep(10000)

            Local $close = _Excel_Close($oExcel_1)
            sleep(10000)
            _FileReadToArray("C:\Users\User\Desktop\CPMautomatorTest.csv" , $aArray, 0, ",")
            sleep(10000)
#CE
ConsoleWrite('Looping - '&@MSEC&@CRLF)
Next
Begin()
EndFunc
;=============================================================================
While 1
    Sleep(100)
WEnd

 

 

Share this post


Link to post
Share on other sites

Comment Start

Comment End

You use that to comment sections, instead of individual lines.


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

hmmm..when I make the suggested edits to the code now I'm stuck at the inputbox

I keep infinitley get prompted to enter in a number again...and again...and again....

why would that be the case? 

Share this post


Link to post
Share on other sites

OH!!!! I was wondering why the text all went green.  So I basically just commented out a whole BUNCH of code

ok...let me see if I can uncomment what I want to uncomment

Share this post


Link to post
Share on other sites

@Hoth2001, #cs and #ce comment out everything in between.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now