6 posts in this topic
This is probably an obvious one, but I really don't use this command at all so am hoping you can spot my mistake.
I'm running a powershell script on a schedule with the following script in a function, the function is being called in a loop, but the console process is not closing in the background and I end up with a bunch of console windows running in the background:
Run(@comspec & ' /k PowerShell.exe -STA -NonInteractive -ExecutionPolicy ByPass -Command "& ''Z:\Powershell\365\GetNextDetails.ps1'' "', "", @SW_HIDE) Thanks!
Local $sPDFtk = FileGetShortName(@ScriptDir & "\pdftk.exe") Local $sInputPDF = FileGetShortName(@ScriptDir & "\Prodis_Test.pdf") Local $sSig_1 = FileGetShortName(@ScriptDir & "\Sig_1.pdf") Local $sTempPDF = FileGetShortName(@ScriptDir & "\Prodis_Test_TEMP.pdf") $iSuccess = ShellExecuteWait($sPDFtk, $sInputPDF & " stamp " & $sSig_1 & " output " & $sTempPDF, "", "", @SW_HIDE) @ScriptDir is "H:\_Conrad lokal\Downloads\AutoIt3\_COX". As you can see there is a space in the path.
I know that ShellExecuteWait is working with FileGetShortName at the filename. It seems to me that I can't pass the parameters that way. But without FileGetShortName it's not working too.
Ideas? Regards, Conrad
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