Jump to content

Recommended Posts

Posted

Ok guys,I have a problem with a script, please help me.

In this script I have 2 problems:

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

Local $fPIC = "" ; "Test.zip"

Local $hGUI = GUICreate("Drag&Drop", 300, 200, 10, 10, -1, $WS_EX_ACCEPTFILES)
Global $hPIC = GUICtrlCreatePic($fPIC, 5, 5, 290, 190);, "", $WS_EX_ACCEPTFILES)
GUICtrlSetState($hPIC, $GUI_DROPACCEPTED)
GUISetOnEvent($GUI_EVENT_CLOSE, "_SpecialEvent")
GUISetOnEvent($GUI_EVENT_DROPPED, "_SpecialEvent")
GUISetState(@SW_SHOW)

While 1
    Sleep(100)
WEnd

Func _SpecialEvent()
    Local $DFile
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Exit
        Case @GUI_CtrlId = $GUI_EVENT_DROPPED
            $DFile = @GUI_DragFile
            ConsoleWrite($DFile & @CRLF)
            If StringRight($DFile, 3) = "rar" Or StringRight($DFile, 3) = "zip" Then MyRun()
    EndSelect
EndFunc ;==>_SpecialEvent
 
Func MyRun ()
 Run(@ScriptDir & "\WinRAR.exe" )
             Sleep(500)
              Send("{CTRLDOWN}o{CTRLUP}")
              Sleep(20)
            Send("{CTRLDOWN}v{CTRLUP}")
            Send ("{ENTER}")
EndFunc

How to make a script to read directly from ConsoleWrite ($ DFile & @ CRLF), or a mod .ini or .txt file and sends it to the portable Winrar?

And second, is it possible portable Winrar to work in HIDE mode, as for utorent is - Run(@ScriptDir & "\uTp\uTorrent.exe /HIDE" ), for WinRar???

Thanks in advance and sorry for my bad English.

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
×
×
  • Create New...