Jump to content

Recommended Posts

Posted (edited)

(iam not good at EN)

I try write a small script , and put it on my VPS Windows

- If i login VPS -> it works:

- After logoff and try login again -> not work ( not control ? )

Pls help

Posted Image

.

.

.

.

Posted Image

$x = 0

While $x < 10
    Test()
    $x = $x+ 1
    Sleep(10000)
WEnd

Func Test()

    If ProcessExists("winrar.exe") Then ProcessClose("winrar.exe")
    $WinRarDir  = @ProgramFilesDir &"\WinRAR\WinRAR.exe"
    Run($WinRarDir)
    Sleep(2000)
    $title = "Compressed - WinRAR"
    ConsoleWrite("-Open Compressed WinRAR")
    WinWaitActive($title)
    WinActive($title)

    If WinActive($title) Then
        ControlFocus( $title, "", "[CLASS:SysListView32; INSTANCE:1]")
        $hwnd = ControlGetHandle( $title, "", "[CLASS:SysListView32; INSTANCE:1]")
        $index = _GUICtrlListView_FindText($hwnd,"zip")
        _GUICtrlListView_SetItemSelected($hwnd, $index)
        _GUICtrlListView_SetItemSelected($hwnd, $index)
        ;.......
        ;......
    EndIf

EndFunc
Edited by pocolo
Posted

I'm sure I've seen methods you can try, they sometimes work and sometimes do not as I recall.

It was something like this.

$PID =Run($WinRarDir)

Get the window handle from PID, and get shut of if WinActive($handle)

No control to work :graduated:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...