Jump to content

Recommended Posts

Posted

hello to all user here in this forum I try to make auto install to stremio setup i make a code that open the setup file and after that the program open and I add a add on link to the program now the problem that I have that this program is a lite web and all button inside this program is like one big window is not detected the buttons so I was see the if I press 19 time on tab it come to the button that I need and is need to press enter after that I made a code that press 19 time on tab but is not work I need your help to solve it  this is my code 

 

#RequireAdmin 

Run("Stremio.exe")

Local $winClass = "[CLASS:TWizardForm]"

WinWait($winClass)
WinActivate($winClass)
WinWaitActive($winClass)

Sleep(500)

ControlClick($winClass, "", "TNewButton1")


ConsoleWrite("Clicked Install Button" & @CRLF)


Sleep(9000)

Local $winClass = "[CLASS:NativeWindowsGuiWindow]"


#RequireAdmin
Opt("WinTitleMatchMode", 2)  

Local $addonURL = "stremio://torrentio.strem.fun/manifest.json"

ShellExecute($addonURL)

Local $winClass = "[CLASS:Qt5152QWindowIcon]"
WinWait($winClass, "", 15)
WinActivate($winClass)
WinWaitActive($winClass)

Sleep(3000)


For $i = 1 To 19
    Send("{TAB}")
    Sleep(100)

Next

Send("{ENTER}")

MsgBox(64, "Finish")

Posted

Hi! And welcome to the forum,

I haven't done things like this before, but taking a quick look I spotted a couple things I thought I would mention.

1. If this is all one script you posted, #RequireAdmin applies to the entire script, so you don't need it more than once per script.

2. Are you sure WinWait($winClass, "", 15) isn't just timing out? Instead of finding your required application window?

You can check by simply adding something like:

If WinExists($winClass) Then ConsoleWrite("> I found it!" & @CRLF)

If it is finding it, you should see the message in the console.

Best Regards,

Donny.

P.S., to post code here a little cleaner. more compact and easier to read, you can check out:

https://www.autoitscript.com/forum/topic/150872-how-to-post-code-on-the-forum/

 

LibreOffice UDF  

Scite4AutoIt Spell-Checker Using LibreOffice

WPS Office adapter — Use MS Word UDFs with WPS Office!

LibreOffice API Inspector tools

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

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...