Jump to content
Sign in to follow this  
jayjay99

Intermitently works

Recommended Posts

jayjay99

Hi,

I'm at a a loss. I have the below script which will work sometimes and sometimes it doesn't work. From what I've witnessed, it seems to not send the {ENTER} key (in the middle after typing the path and filename of c:\crm_imp_exp\vtigerdata.csv) in the "File Upload" window. Note, this script is is launched by a task scheduler. Note, I also masked the IP with "?".

; Run firefox

Run("C:\Program Files\Mozilla Firefox\firefox.exe")

Sleep(2000)

; Use AutoItSetOption to slow down the typing speed so we can see it :)

;AutoItSetOption("SendKeyDelay", 400)

send("j")

Sleep(250)

send("{DOWN}")

Sleep(250)

send("{TAB}")

Sleep(250)

send("jumpy")

Sleep(250)

send("{TAB}")

send("{ENTER}")

Sleep(3500)

send("!F")

Sleep(250)

send("{ENTER}")

Sleep(2000)

send("http://???.???.???.??/index.php?module=Project&action=Import&step=1&return_module=Project&return_action=index&parenttab=Support")

Sleep(250)

send("{ENTER}")

Sleep(3500)

AutoItSetOption("SendKeyDelay", 250)

Send("{TAB 36}")

send("{ENTER}")

Do

Sleep(250)

Until WinWaitActive("File Upload")

AutoItSetOption("SendKeyDelay", 50)

send("c:\crm_imp_exp\vtigerdata.csv")

send("{ENTER}")

AutoItSetOption("SendKeyDelay", 250)

Send("{TAB 4}")

send("{ENTER}")

AutoItSetOption("SendKeyDelay", 5)

Sleep(5000)

AutoItSetOption("SendKeyDelay", 250)

Send("{TAB 36}")

send(" ")

send("{TAB}")

send("{DOWN}")

AutoItSetOption("SendKeyDelay", 5)

Sleep(1500)

AutoItSetOption("SendKeyDelay", 250)

Send("{TAB 30}")

send(" ")

send("{TAB}")

send("{DOWN}")

send("{TAB 7}")

AutoItSetOption("SendKeyDelay", 5)

send("{ENTER}")

Sleep(100000)

send("!F")

Sleep(250)

send("x")

What would cause this 'flakey' behavior? Please help because when I look at the script run, it runs fine for about 2-3 times, then the 4th time it won't run properly so I have to manually kill the task and manuallyl close the window. Then I'll start the script again, it will work , oh wait, no it doesn't work well. yes, this time its good. It's always in that "File Upload" window where it seems to be bugging.

please help.

Thanks,

J

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
Sign in to follow this  

×