Problem is this
myscript -p <zumerkelen> -x something else myscript is my AutoIt compiled CUI.
-p <> is first param - fails, see below
-x [text] second param, works.
When I run this with the param enclosed in <> I get the response
The syntax of the command is incorrect.
Experimentation indicates that the <> tags are the problem.
_ArrayDisplay($CmdLine, "1 Array") MsgBox(16, "1 Raw", $CmdLineRaw) The problem is with the reading of the command line. It fails BEFORE it gets into the variables...
I am not dealing with AutoIt, or even my own command line, this is legacy software. It seems that AutoIt "interprets" the <> before loading the command line... I need to be able to read that as text without it being interpreted.
The only part I can control is my script, the myscript, which I can change at will.
The standard command line functions appear all to interpret params on read. I want those params read raw. If I could just get that as a string it would be fine.
Where to look?
Im creating a tab
Global $Tab1 = GUICtrlCreateTab(30, 30, 600, 420, $TCS_BUTTONS, -1) And what we see in the function reference:
GUICtrlCreateTab ( left, top [, width [, height [, style = -1 [, exStyle = -1]]]] ) ok in 5 arg I got $TCS_BUTTONS
But How can I use multiple args like this below
Global $Tab1 = GUICtrlCreateTab(30, 30, 600, 420, [$TCS_BUTTONS, $TCS_MULTILINE], -1)
If I am using a RunWait command to launch a batch file from within an AutoIt script, how can I pass a variable to said batch file so that the batch file can utilize said variable like in a %var% format? Thank you in advance.
I'm trying to create a program where the user can input a material number into a GUI and the script will search out and find the respected material folder. I've been able to piece together the file mapping part so that the correct folder is stored within a variable. However I can not seem to get the Run function to work as the directory contains commas. Could I please get assistance with this?
Here is some test code I've experimented with
$filepath = "C:\Users\annoymousx\Documents\" ; Variable Works ;$filepath = "C:\Users\annoymousx\Documents\Test with Spaces\"; Works with folder spacing $filepath = $filepath & "Test with Spaces\"; Works with using a prior directory history $filepath = $filepath & "Folder with ()"; Works if brackets are used ;$filepath = $filepath & "\Folder with ," ;Does not Work if comma is used in file directory $filepath = $filepath & "\Folder with " & ""","""; Works if triple brackets are used Run("explorer.exe " & $filepath)
So I've learnt if you put triple quotations around a comma it will work correctly. The challenge is, in the actual script i'm not manually entering in text.
$filepath = $filepath & $Materialclass[$classnum] & "\"
Which is put into a loop, then at the end of the script I have the correct file path saved to the variable but it may contain many commas.
How would I take this variable with the correct file path and open windows explore to it?
Say if the variable contained the value: C:\Users\anonymousx\Documents\This folder has a ,\comma, (comma, comma,)\And more , here
Thanks for any suggestions,
I am trying to rebuild an old single signon script that has been giving us a bit of trouble lately. I didn't write it and it was written in another script language. If the target program is already open it will have the current user's last name as part of the window text, which I am trying to compare against the user name to see if I should just WinActivate or Process Close and start the program over. I will be provided the username like "jones", or "smith" and the title check works fine for last names (with no spaces), but if the last name DOES contains spaces, say "Nom De Plume", then all I will be given as a username is "nomdeplume". Is there any way (via a regex maybe) that I can still check the text on the screen and somehow ? I have been reading about the Advanced (4) mode of WinTitleMatchMode, but it is over my head. Any help is appreciated. Here is a small reproducer script:
Opt("WinTitleMatchMode", -1) Run("Notepad") WinWait("[CLASS:Notepad]", "", 10) Send ("Smith" & @CRLF & "Jones" & @CRLF & "Nom De Plume" & @CRLF) If WinExists("[CLASS:Notepad]", "jones") Then MsgBox(0,"FOUND","Found Jones") EndIf If WinExists("[CLASS:Notepad]", "nomdeplume") Then MsgBox(0,"FOUND","Found Nom De Plume") EndIf