Recce Posted September 14, 2008 Posted September 14, 2008 Hi all!I am all new to AutoIt and need a little help My search in the forum and help file returned no solution.Using ControlClick and "primary" or "main" returns error:(The "primary" or "main" button will be the main click, whether or not the buttons are swapped.)Code:if WinExists("Tabular Editor -") = 0 Then ControlClick("FalconView", "",1617, "primary", 1, 15, 115)ErrorERROR: ControlClick() called with illegal argument 4: "primary"Entire code:RunWait(@COMSPEC & " /c Start fvw.exe") WinWait("FalconView -","") If Not WinActive("FalconView -","") Then WinActivate("FalconView -","") WinWaitActive("FalconView -","") Send("{CTRLDOWN}n{CTRLUP}") WinWait("New","") If Not WinActive("New","") Then WinActivate("New","") WinWaitActive("New","") Send("rppp{ENTER}") if WinExists("Tabular Editor -") = 0 Then ControlClick("FalconView", "",1617, "primary", 1, 15, 115) WinWait("Tabular Editor -","") If Not WinActive("Tabular Editor -","") Then WinActivate("Tabular Editor -","") WinWaitActive("Tabular Editor -","") Send("!di") WinWait("Select Data Source","") If Not WinActive("Select Data Source","") Then WinActivate("Select Data Source","") Send("!n") Send("C:\Pfps\MPU\TXT2LPT\Output TXT\FalconView Text file.txt{ENTER}") WinWaitActive("Text Import Wizard") Send("+{TAB 1}") Send("{ENTER}") WinWaitActive("Load Import Settings") Send("!n") Send("C:\Pfps\Data\ImportSettings\MPU© - TXT2LPT - Import Settings - 5. Maj 2008.ipt") Send("{ENTER}") WinWaitActive("Import Information") Send("{ENTER}")Any help is very welcome!/ThomasDenmark
Andreik Posted September 14, 2008 Posted September 14, 2008 I saw in your code something like this "Tabular Editor -". If this is not a full title name use AutoitSetOption("WinTitleMatchMode",2). About your error be sure of control ID.
Recce Posted September 14, 2008 Author Posted September 14, 2008 Thank you Andreik!It seems to bee the "Auto test.au3" in SciTE that is coursing the error (or wrongly reporting an error). I added the AutoitSetOption("WinTitleMatchMode",2) I hope in the correct location?!?/Thomasexpandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: Thomas Larsen Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here AutoitSetOption("WinTitleMatchMode",2) RunWait(@COMSPEC & " /c Start fvw.exe") WinWait("FalconView -","") If Not WinActive("FalconView -","") Then WinActivate("FalconView -","") WinWaitActive("FalconView -","") Send("{CTRLDOWN}n{CTRLUP}") WinActivate("New","") WinWaitActive("New","") Send("rppp") Send("{ENTER}" ) if WinExists("Tabular Editor -") = 0 Then ControlClick("FalconView", "","[ID:1617]", "main", 1, 15, 115) WinWait("Tabular Editor -","") If Not WinActive("Tabular Editor -","") Then WinActivate("Tabular Editor -","") WinWaitActive("Tabular Editor -","") Send("!di") WinWait("Select Data Source","") If Not WinActive("Select Data Source","") Then WinActivate("Select Data Source","") Send("!n") Send("C:\Pfps\MPU\TXT2LPT\Output TXT\FalconView Text file.txt{ENTER}") WinWaitActive("Text Import Wizard") Send("+{TAB 1}") Send("{ENTER}") WinWaitActive("Load Import Settings") Send("!n") Send("C:\Pfps\Data\ImportSettings\MPU© - TXT2LPT - Import Settings - 5. Maj 2008.ipt") Send("{ENTER}") WinWaitActive("Import Information") Send("{ENTER}")
rasim Posted September 15, 2008 Posted September 15, 2008 RecceFrom the help:Button Normal Swapped "" Lef Left "left" Left Left "middle" Middle Middle "right" Right Right "primary" Left Right "main" Left Right "secondary" Right Left "menu" Right LeftPrimary and Main is the Left mouse button.
PsaltyDS Posted September 15, 2008 Posted September 15, 2008 This is simply a bug. Reported and fixed in BugTrac for 3.2.13.8 Beta: ControlClick with "new" buttons syntax error (au3check) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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