Jump to content

Search the Community

Showing results for tags 'uez'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I' working on this code: ;coded by UEZ build 2014-02-08, idea taken from http://codepen.io/Fahrenheit/pen/Kbyxu ;AutoIt v3.3.9.21 or higher needed! #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <Constants.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172; $IMAGE_BITMAP = 0 ;Global $iW = 1920, $iH = 1080 Global $iW = 920, $iH = 680 ;Global $Color_white = 0x3C3C3C3C Global Const $hGUI = GUICreate("One moment...", $iW, $iH, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) Global Const $iPic = GUICtrlCreatePic("", 650, 350, $iW, $iH) ;Global Const $iPic = GUICtrlCreatePic("", 250, 50, $iW, $iH) GUICtrlSetState(-1, $GUI_DISABLE) GUISetBkColor($Color_white) GUISetState() Global $hHBmp_BG, $hB, $iPerc = 0, $iSleep = 60, $s = 0, $t, $m = 0 GUIRegisterMsg($WM_TIMER, "PlayAnim") DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0) Global $DOS, $Message = '' ;; added "= ''" for show only. Global $sProcess = "calc.exe", $iDummy = GUICtrlCreateDummy(), $iAmountProcesses = 1 Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iDummy GUIRegisterMsg($WM_TIMER, "") _WinAPI_DeleteObject($hHBmp_BG) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch $aPL = ProcessList($sProcess) $DOS = Run(@ComSpec & ' /c tasklist /S server1 /U server1\admin /P password /FI "USERNAME eq ' & @UserName & '" /FI "IMAGENAME eq calc*"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($DOS) $Message = StdoutRead($DOS) Local $Proq = StringInStr($Message, "calc.exe") If IsArray($aPL) Then If $aPL[0][0] > $iAmountProcesses - 1 Then if $Proq > 1 Then GUICtrlSendToDummy($iDummy) EndIf Else ;$iPerc = $aPL[0][0] / $iAmountProcesses * 100 EndIf EndIf Until False The code is longer but I haven't changed it beyond here so I only am listing this part. It's the nested if statement that I think is giving a problem: if $Proq > 1 then. The program brings up an animation. The animation has to keep running until both calc.exe processes are running: one on the local computer and one on the remote computer server1. Behavior now is that the animation never stops.
×
×
  • Create New...