Send("{F5}") does not work
- robmeyer
- Guardian Gecko
Post
Send("{F5}") does not work
Is there a AutoIt-user who can solve the problem why "Send("{F5}")" in my AutoIt.exe nearly never works. I myself have to hit F5 to get the mail.
- Sidewinder
- Weary Womble
Post
Re: Send("{F5}") does not work
What I have found is that the command is being submitted too soon and therefore not effective. Try putting in a wait delay to allow the called program to settle.
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- robmeyer
- Guardian Gecko
Post
Rob
Re: Send("{F5}") does not work
$wait was 8, now it is 12. I wait and see. ThanksTry putting in a wait delay to allow the called program to settle.

Rob
- Sidewinder
- Weary Womble
Post
Re: Send("{F5}") does not work
Mine is "WinWaitActive for 10 if Outlook is already running and "WinWait" for 40 followed by a Sleep (10000) when it is not running. The not running occurance may still be a little too short depending on system activity.
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- robmeyer
- Guardian Gecko
Post
Re: Send("{F5}") does not work
I have to say that up till now "Send("{F5}")" does work like it should
but maybe this qoute will makes it still better
Do I have to give $Regex another value?
$regex = "[REGEXPTITLE:.*Eudora.*]"
; If Thunderbird is running activate it and check mail
If ProcessExists("eudora.exe") Then
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
If $noget == "" then
Send("+{F5}") ; Check mail command
endif
Exit
EndIf ; ProcessExists
; If Thunderbird is not running start it, activate it and check mail
If 0 == Run($program) Then
MsgBox(64, "Program", "Not Found - Check your registry key")
Exit
EndIf ; Program not found
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)


but maybe this qoute will makes it still better

How do I set it in mine AutoIt?Mine is "WinWaitActive for 10 if Outlook is already running and "WinWait" for 40 followed by a Sleep (10000) when it is not running. The not running occurance may still be a little too short depending on system activity.
Do I have to give $Regex another value?
$regex = "[REGEXPTITLE:.*Eudora.*]"
; If Thunderbird is running activate it and check mail
If ProcessExists("eudora.exe") Then
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
If $noget == "" then
Send("+{F5}") ; Check mail command
endif
Exit
EndIf ; ProcessExists
; If Thunderbird is not running start it, activate it and check mail
If 0 == Run($program) Then
MsgBox(64, "Program", "Not Found - Check your registry key")
Exit
EndIf ; Program not found
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
- Sidewinder
- Weary Womble
Post
Re: Send("{F5}") does not work
Here is my full script:
The first two lines are there to distinguish whether the OS is 64 or 35 bit.
The first two lines are there to distinguish whether the OS is 64 or 35 bit.
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- robmeyer
- Guardian Gecko
Post
Re: Send("{F5}") does not work
I want to copy your script, but I do not recognise the sign before "OSArch="X64";
what key is it on the keyboard?
what key is it on the keyboard?
- Sidewinder
- Weary Womble
Post
It is the "at" symbol
Re: Send("{F5}") does not work
Upper Case 2robmeyer wrote:I want to copy your script, but I do not recognise the sign before "OSArch="X64";
what key is it on the keyboard?
It is the "at" symbol
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- robmeyer
- Guardian Gecko
Post
Re: Send("{F5}") does not work
Hi Sidewinder,
I copied your script like this and please read the questions: This script does not fetch mail
There is an error in the script, found by Ctrl-F5, but compiling has no problems.
For comparison here is the script I use: Mailfetching is a matter of good luck: sometimes it works, mostly not: Do you see some line that could be better?
Thanks
Rob
I copied your script like this and please read the questions: This script does not fetch mail
There is an error in the script, found by Ctrl-F5, but compiling has no problems.
For comparison here is the script I use: Mailfetching is a matter of good luck: sometimes it works, mostly not: Do you see some line that could be better?
Thanks
Rob
- Sidewinder
- Weary Womble
Post
F5 was the "old" Send/Receive command for Outlook. F9 is now designated as the current version, however mine still responds to the F5 key. My guess is that there were too many users with older scripts that it was just easier to leave the code in place.
I'm about to embark on a refresh of my Outlook unique script to update it to the latest set of keyboard shortcuts.
Re: Send("{F5}") does not work
The commands in question were keyboard shortcuts for navigating the UI menus. That version of Outlook when running and open in a different area (other than mail) would not respond correctly to the Send/Recieve some of the time. I found that by making sure that it was at a specific UI I/F it would the work most of the time.robmeyer wrote:Hi Sidewinder,
I copied your script like this and please read the questions: This script does not fetch mail
There is an error in the script, found by Ctrl-F5, but compiling has no problems.
For comparison here is the script I use: Mailfetching is a matter of good luck: sometimes it works, mostly not: Do you see some line that could be better?
Thanks
Rob
F5 was the "old" Send/Receive command for Outlook. F9 is now designated as the current version, however mine still responds to the F5 key. My guess is that there were too many users with older scripts that it was just easier to leave the code in place.
I'm about to embark on a refresh of my Outlook unique script to update it to the latest set of keyboard shortcuts.
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- Sidewinder
- Weary Womble
Post
Re: Send("{F5}") does not work
Here is my latest update for Outlook 2010:
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
- robmeyer
- Guardian Gecko
Post
Re: Send("{F5}") does not work
This one works fine for me. Controlling with Tools\Ctrl-F5 finds an error with "^", but compiling is OK.
- robmeyer
- Guardian Gecko
Post
Re: Send("{F5}") does not work
The truth is that both scripts (yours and mine) don't fetch mail;
WHY
Yours:
If @OSArch= "X64" then
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clients\Mail\Eudora\shell\open\command","")
Else
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Eudora\shell\open\command","")
EndIf
;$program = "D:\Global\EudoraOSE\eudora.exe"
If ProcessExists("eudora.exe") Then
Run($program)
WinActivate("EudoraOSE")
WinWaitActive(("EudoraOSE"), "", 10)
Send("^1")
Sleep (100)
WinActivate("EudoraOSE")
Send("{F5}")
Exit
Else
Run($program)
WinWait(("EudoraOSE"), "", 40)
Sleep(10000)
WinActivate("EudoraOSE")
Send("{F5}")
EndIf
Exit
Mine:
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clients\Mail\Eudora\shell\open\command","")
;$program = "d:\Global\EudoraOSE\eudora.exe"
;$regex = "[REGEXPTITLE:.*EudoraOSE.*]"
; Check command line parameters.
; If parameter exists use this as the zoom level.
;If 2 parameters exist the first is the zoom and the second will stop the mail from being fetched
$zoom = 0
$noget = ""
if $CmdLine[0] == 1 Then
$zoom = $CmdLine[1]
EndIf
; 2 parameters 1st = zoom, second stop mail fetch.
if $CmdLine[0] == 2 Then
$zoom = $CmdLine[1]
$noget = $CmdLine[2]
EndIf
$wait = "15" ; Number of seconds to wait for the Window to become available before failing
; Now we have the information we need collected so we are ready to Activate or Run Thunderbird
; If Thunderbird is running activate it and check mail
If ProcessExists("eudora.exe") Then
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
If $noget == "" then
Send("+{F5}") ; Check mail command
endif
Exit
EndIf ; ProcessExists
; If Thunderbird is not running start it, activate it and check mail
If 0 == Run($program) Then
MsgBox(64, "Program", "Not Found - Check your registry key")
Exit
EndIf ; Program not found
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
;Use the zoom level from the command line parameter if one exists
if $zoom <> 0 Then
Send("{CTRLDOWN}")
$i = 0
Do
Send("{NUMPADADD}")
$i = $i + 1
until $i = $zoom
Send("{CTRLUP}")
EndIf
If $noget == "" then
Send("{F5}") ; Check mail command
EndIf
Exit
WHY



Yours:
If @OSArch= "X64" then
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clients\Mail\Eudora\shell\open\command","")
Else
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Eudora\shell\open\command","")
EndIf
;$program = "D:\Global\EudoraOSE\eudora.exe"
If ProcessExists("eudora.exe") Then
Run($program)
WinActivate("EudoraOSE")
WinWaitActive(("EudoraOSE"), "", 10)
Send("^1")
Sleep (100)
WinActivate("EudoraOSE")
Send("{F5}")
Exit
Else
Run($program)
WinWait(("EudoraOSE"), "", 40)
Sleep(10000)
WinActivate("EudoraOSE")
Send("{F5}")
EndIf
Exit
Mine:
$program = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clients\Mail\Eudora\shell\open\command","")
;$program = "d:\Global\EudoraOSE\eudora.exe"
;$regex = "[REGEXPTITLE:.*EudoraOSE.*]"
; Check command line parameters.
; If parameter exists use this as the zoom level.
;If 2 parameters exist the first is the zoom and the second will stop the mail from being fetched
$zoom = 0
$noget = ""
if $CmdLine[0] == 1 Then
$zoom = $CmdLine[1]
EndIf
; 2 parameters 1st = zoom, second stop mail fetch.
if $CmdLine[0] == 2 Then
$zoom = $CmdLine[1]
$noget = $CmdLine[2]
EndIf
$wait = "15" ; Number of seconds to wait for the Window to become available before failing
; Now we have the information we need collected so we are ready to Activate or Run Thunderbird
; If Thunderbird is running activate it and check mail
If ProcessExists("eudora.exe") Then
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
If $noget == "" then
Send("+{F5}") ; Check mail command
endif
Exit
EndIf ; ProcessExists
; If Thunderbird is not running start it, activate it and check mail
If 0 == Run($program) Then
MsgBox(64, "Program", "Not Found - Check your registry key")
Exit
EndIf ; Program not found
If 0 == WinWait($regex, "", $wait) Then
MsgBox(64, "Window", "Not Found - Check your regex code")
Exit
EndIf ; Window not found
WinActivate($regex)
WinWaitActive($regex)
;Use the zoom level from the command line parameter if one exists
if $zoom <> 0 Then
Send("{CTRLDOWN}")
$i = 0
Do
Send("{NUMPADADD}")
$i = $i + 1
until $i = $zoom
Send("{CTRLUP}")
EndIf
If $noget == "" then
Send("{F5}") ; Check mail command
EndIf
Exit