Jump to content

IDM AutoIt problem


Recommended Posts

im trying to make IDM silent install with autoit , the problem is :

IDM when starts sometimes start with a chose language screen which is something like this :

Case 1 :

post-75969-0-03787700-1394747530_thumb.j

and other times it starts with the normal setup screen which is :

Case 2 :

post-75969-0-98572000-1394747593_thumb.p

my problem is :

How to make autoit when the first screen appear Case 1 so the script go on with chose language process and if IDM just start with Case 2 the script then escape Case 1 and work with Case 2 .

I hope that im clear .

autoit script here installxp.au3

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf

EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---


Run('idman.exe')
WinWait("IDM Setup","الرجاء تحديد اللغة ل")
If Not WinActive("IDM Setup","الرجاء تحديد اللغة ل") Then WinActivate("Internet Download Manager Installation Wizard","")
_WinWaitActivate("IDM Setup","الرجاء تحديد اللغة ل")
Send("{TAB}{DOWN}{DOWN}{DOWN}{DOWN}{TAB}{ENTER}")
_WinWaitActivate("Internet Download Manager Installation Wizard","")
Send("{ENTER}")
_WinWaitActivate("Please read IDM license","")
Send("{ENTER}")
_WinWaitActivate("Choose Destination Location","")
Send("{ENTER}")
_WinWaitActivate("Start Installation of Internet Download Manager","")
Send("{ENTER}")
_WinWaitActivate("Installation Complete","")
Send("{ENTER}")
Sleep(3000)
ProcessClose("IDMan.exe")
ProcessClose("IEMonitor.exe")
ProcessClose("IEXPLORE.exe")
#endregion --- Au3Recorder generated code End ---

thank you

Link to comment
Share on other sites

Link to comment
Share on other sites

  • Moderators

If you do a forum search for IDM (you did that before posting, right???), you will find a number of posts about automating the installation of this P.O.C. software. Those that do manage to get it working are usually sorry, finding it nearly impossible to remove all the crap it installs. In my experience, IDM is about one step above malware.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I crude way you could do it is check winexists 'window#1 w/text' then active 'window#1 w/text'.. do sendcommand.

Have like 7,8,9,15, etc of these and loop them. After all there should only be ONE window with the title and text... Right?

If WinExists("IDM Setup", "one of a kind unique text") Then
    WinActivate("IDM Setup","one of a kind unique text")
    Send("some keys")
EndIf
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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