sathish Posted February 17, 2012 Share Posted February 17, 2012 hello forum I am sending a input from command line, like this: ccc.au3 "d:\images" while i get this input from command line inside script $cmdLineRaw() this returns only the first letter, say ", when i remove ", it returns only d how to sort out this issue and how do i get the whole text inside Quotes Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 We need more information to help you. Can you post the script you have so far? What AutoIt version do you run? BTW: $cmdlineraw is a variable and not a function. So please use $cmdlineraw without the parenthesis. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 We need more information to help you. Can you post the script you have so far? What AutoIt version do you run? BTW: $cmdlineraw is a variable and not a function. So please use $cmdlineraw without the parenthesis. $input = $CmdLineRaw() send ("!{TAB}") sleep (500) WinMenuSelectItem("[class:EQNWINCLASS]", "", "&File", "Save &As") WinWaitActive("Save As") ControlSend("Save As", "", "", "{" & $input & "}") ;ControlCommand ( "Save As", "&Automatic file numbering:", 20, "UNCHECK") ;ControlSend("Save As", "", "", "!t") ;sleep (100) ;ControlSend("Save As", "", "", "Graphics") ;Sleep(3000) ;If WinExists("Save As") Then ;ControlClick("Save As", "Yes", "[ID:6]") ;EndIf This is the script i am trying to execute Please help Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 We need more information to help you. Can you post the script you have so far? What AutoIt version do you run? BTW: $cmdlineraw is a variable and not a function. So please use $cmdlineraw without the parenthesis. I tried with bracket, without bracket, $cmdline[0],$cmdline[1],$cmdline[2], But i am getting only the first letter of the command line input, is there any unique way to run autoit exe in cmd line now i am running like this: >sss.exe "D:imgs" Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 Insert a MsgBox(0, "", $input)after$input = $CmdLineRaw()so you can see what you get. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 (edited) Insert a MsgBox(0, "", $input)after$input = $CmdLineRaw()so you can see what you get. Thanks mate i am getting the full command line text, but what happens when i send it through ControlSend("Save As", "", "", "{" & $input & "}") there it sends only the first letter, Is the syntax wrong in controlsend, Dont mind, i am perl developer, i am learning autoit day by day slowly, So if its a simple, please dont mind, Anyways, thanks a lot Edited February 17, 2012 by sathish Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 Parameter 3 of your Send statement is wrong. The control-Id of the "receiving" control is needed. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 Parameter 3 of your Send statement is wrong. The control-Id of the "receiving" control is needed.I have attached the image, there is no control id for that, anyway without control id, i have Controlsend many times in some other instances, it has been workingThe thing is please take a look at the image in the "File name" field,There i need to send the $cmdlineraw value,Now i think i have some what clearly explained my question,Thanks in advanceSathish V. Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 As the input you try to send contains brackets you should set parameter 5 of the ControlSend function to "1".The ControlID can be more than just the ID. Please check this help site. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 As the input you try to send contains brackets you should set parameter 5 of the ControlSend function to "1".The ControlID can be more than just the ID. Please check this help site.I am really blind now, ControlSend("Save As", "", "", "", & $input &)The need for me is to just send the $cmdlineraw content, that brackets and all i simply tried,say for example i am sending just "D:water" from command line, i want that to be passed in that controlsend,Believe me, i tried and searched and googled for nearly 8 hours now, still i didn't get the solutionThanks in AdvanceSathish V.Could you please send me the exact Control send Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 TryControlSend("Save As", "", "[ClassNN:#327701]", $input, 1) MsgBox(0, "", "Error: " & @error) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sathish Posted February 17, 2012 Author Share Posted February 17, 2012 TryControlSend("Save As", "", "[ClassNN:#327701]", $input, 1) MsgBox(0, "", "Error: " & @error) It works thanks mate, but i removed the [class], after that only it works fine, Thanks a lot Link to comment Share on other sites More sharing options...
water Posted February 17, 2012 Share Posted February 17, 2012 Glad to be of service My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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