Jump to content

Recommended Posts

Posted

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

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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

Posted

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"

Posted

Insert a

MsgBox(0, "", $input)
after
$input = $CmdLineRaw()
so you can see what you get.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (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 by sathish
Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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 working

The 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 advance

Sathish V.

post-69004-0-12381900-1329473270_thumb.j

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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 solution

Thanks in Advance

Sathish V.

Could you please send me the exact Control send

Posted

Try

ControlSend("Save As", "", "[ClassNN:#327701]", $input, 1)
MsgBox(0, "", "Error: " & @error)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Glad to be of service :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
×
×
  • Create New...