Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/06/2013 in all areas

  1. Perhaps this is suitable. Not sure if you want an input box in the function as you left it out of your last attempt and it would make a parameter strange to have that you request. ; get the copyright banner and the initial prompt $prompt = RemoteShell('"' & @ComSpec & '"') While 1 $command = InputBox('Enter Command','Please enter a command for the Console') If @error Then ExitLoop MsgBox(0, @ComSpec, $prompt & $command & @CRLF & @CRLF & RemoteShell($command)) WEnd Func RemoteShell($command) ; run command in cmdline mode Local $pid, $stdout Local Const $STDERR_MERGED = 8 $pid = Run('"' & @ComSpec & '" /c ' & $command, '', @SW_HIDE, $STDERR_MERGED) Do Sleep(10) $stdout &= StdOutRead($pid) Until @error Return $stdout EndFunc
    1 point
  2. Flisker, Save the difficult code in a file - then using it becomes a 2-line matter: one to #include the file and one to call the function within it. M23
    1 point
  3. I beg to differ. Local variables within loops are not forcibly wrong practice. Blindly chasing such construct may result in much poorer code.
    1 point
  4. @Cubex Sorry, no idea why... I would just be guessing @milad 1 A is the email address and means it can be placed on multiple computers... using that same email address B Registered owner license can be placed on as many computers as that owner is registered as owner C Self explanitory 2 No, That would have to be 3 different programs 3 Yes, you may change the code in anyway you wish... Thanks for asking Sorry I was so late in my reply, I did not see your post ( I'm not here all the time ) 8)
    1 point
  5. Have a look here: '?do=embed' frameborder='0' data-embedContent>> Br, UEZ
    1 point
  6. You could slightly modify your script (only in test version) and add an "external" Switch construct in this way: Global $GOTO = 0 Switch $GOTO Case 0 ; your whole script goes between these two lines ; ------------ start of your script ------------ MsgBox(0,"", "Good morning") $goto = 150 ; | <-- insert this 2 lines to simulate GOTO 150 ContinueCase ; | this will jump to case 150 ; Case 50 MsgBox(0,"", "Good Afternoon") ; Case 100 MsgBox(0,"", "Good Evening") Case 150 ; | <-- uncomment this to jump here MsgBox(0,"", "What are you still doing up?") ; ------------- end of your script ------------- EndSwitch then move the pair $goto 150 - ContinueCase and Case 150 where you want to jump P.S. just an idea (I post even if I do not like it )
    1 point
  7. willichan

    WinWaitMulti

    I've been writing my end-of-year clean-up/upgrade/patch scripts for the new year. This time, one of the installs is giving me a completely different set of dialogs depending on whether there is a previous installation above a certain version or not. Since proper version detection is a convoluted mess, I wrote a version of WinWait that is able to take multiple window definitions, and report back which one was encountered. I hope this is helpful to anyone else needing a similar function. The Zip file contains two files: (not at all obvious, I know ) WinWaitMulti.au3 - the include file example.au3 - the example file WinWaitMulti.zip
    1 point
  8. $text = StringReplace($line, '"', '')
    1 point
×
×
  • Create New...