6 posts in this topic
I am trying to send a CTRL+G to a command prompt.
It should send something like ^G this to the prompt but instead it sends only the G.
To give more insight into what I am trying to create here:
At my work we need a programm to open de cashdrawer using the commandprompt, i created a gui where you can set the COM-port to wich the command should be send.
This works the COM-port setting is writting in a .ini file to be used every time the program opens.
I have attached the files to the post.
Hope someone can help me.
how do I break the loop if my program is stuck in it without exiting the whole program?
i just want it to start from the beginning of the code here is my program
$picture = "target.png"
$result = _ImageSearch($picture,1,$x1,$y1,0,0)
If $result = 1 Then
$picture2 = "status.png"
$result2 = _ImageSearch($picture2,1,$x1,$y1,0,0)
Until $result2 = 1
as you see if my program doesnt detect or see picture2 then the loop wont stop.
Trying to automate the sideload of a Windows Store app via .ps1 script...
RunWait(@ComSpec & ' /c' & 'C:\"WB Resources"\APP_Prod\Add-AppDevPackage.ps1') Above doesn't work... I assume this is trying to open in CMD.
Normally we right click the .ps1 and open with powershell, then we have to type "A" to start the install, it installs and then type any yet to exit.
However I cant get the powershell to even open.
Kind of puzzled here, any suggestions would be a help.
PS I also tried to convert the .ps1 to exe, but that was a huge failure... lol
I just wrote a script that should copy data into my cloud using xcopy (cmd), but I want the Status Bar I have in my GUI to change it's text like that:
working. -> working.. -> working... -> working. ...
I would also like to make a button which interrupts xcopy (simply closing it should do the trick), but I don't know how to call ProcessClose("xcopy.exe") using a button, while I'am waiting for RunWait to finish.
$command = 'xcopy "' & @DesktopDir & '\text.txt"' & ' "\\ADMIN-CLOUD\private\" /EECHIY' $SW_STATE = @SW_HIDE RunWait(@ComSpec & " /c " & '"' & $command & '"', @DesktopDir, $SW_State) Please tell me if you need any further information!
I have this button in an app I am building:
When you click it, it then opens a FileOpenDialog() I select and XML, then it asks for a name input, enter the name, then it should run the following code:
schtasks.exe /create /tn XXXX-task /XML C:\WBRESO~1\WB-LOO~1\TESTIN~1.XML It works when I put it in the CMD and run it, I get SUCCESS! and the new task has been created in Task Scheduler.
C:\Users\vivaed>schtasks.exe /create /tn XXXX /xml C:\WBRESO~1\WB-LOO~1\TESTIN~1.XML SUCCESS: The scheduled task "XXXX" has successfully been created. But when I run it in:
(This is just a snippet of the code, there is a lot more)
#include <AutoItConstants.au3> Global $wbResources = 'C:\"WB Resources"\WB-LoopChecker\' Case $Button4 $getXML = FileOpenDialog("Find task to import", $wbResources ,"XML (*.xml)") If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No file was selected.") Else Local $taskName = InputBox("Name this task","File: " & @CRLF & $getXML & @CRLF & "Name this task:" & @CRLF,"XXXX-task") $schedTask = 'schtasks.exe /create /tn ' & $taskName & ' /XML ' & FileGetShortName($getXML) Run(@ComSpec & " /c " & $schedTask, @SW_HIDE) ConsoleWrite($wbResources & @CRLF) ConsoleWrite($schedTask & @CRLF) EndIf Here I dont get any errors but the when I refresh the Task Scheduler, there is no new task....