Let me start by explaining I'm a n00b, using the trial&error method and consulting help files only when needed for developing a working solution instead of studying the basics much.
I'm struggling with a RunWait command utilizing the Windows command prompt, for which I found valuable information on this very forum. I've tested the functionality to be working, but when introducing the value of an edit field of my GUI to the code, it's not working.
The entire solution has grown quite a bit over time so I won't share the entire code, but here are the fundamentals:
Code: Select all
Gui, Add, Edit, x70 y370 w75 h20 BackgroundTrans +Uppercase vComputer,
Gui, Add, Button, x145 y370 w20 h20 -TabStop gButtonRA, &r
Gui, Add, Button, x165 y370 w10 h20 -TabStop gCopyClipComputer, &c
Gui, Show, w365 h500, SDLogTool
GuiClose:
ExitApp
CopyClipComputer:
Gui, Submit, NoHide
clipboard = % Computer
TrayTip, SDLogTool, Computernummer gekopieerd naar klembord, 2, 1
Return
ButtonRA:
RunWait, %comspec% /c msra /offerra %Computer%
Return
Button ButtonRA currently results in Windows Remote Assistant launching, but without the Computer-value or maybe a false one (I can't track the result).
The entered value is always something like LT-12345. When I hardcode a value (i.e. RunWait, %comspec% /c msra /offerra LT-12345) it's working fine, but not using variable %Computer%.
I can't figure out what I'm doing wrong and would very much appreciate it if someone can point it out to me.
Thanks a lot