Jump to content

Recommended Posts

Posted (edited)

I recently installed Autoit, and tried to make couple of macros. In some occasion I managed to make simple macros, but in this I couldn't find solution.

I have newest version of Autoit, using Windows 10 x64.

I tried to make macro to close the window/application "Tor browser"
It activates the window if it is not active but doesn't close it:

WinActivate("About Tor - Tor Browser")
WinClose("About Tor - Tor Browser")

It doesnt report an error, it executes the macro, but window is not closed.

I also tried Winkill, and to record strokes alt+F4, alt+X... but no luck
Help will be appreciated.

Edited by Robert9
Posted

It would be better if you could post your code.   Otherwise, it is hard to say what is happening.  WinClose should return either a 0 or 1.  When you say you get no error are you getting a 1?  That would mean success and no error. You can double check it this way:

$result=WinClose("About Tor - Tor Browser")

msgbox(0,"Result","This is the result: "&$result)

 

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Posted

Same result with WinKill. You can check if you install this program Tor Browser.
It is only one instance.

Is there a command to close a program by location on disk? like "C:\Tor Browser\Browser\firefox.exe"

Posted (edited)

Update: now I compiled the script and run it as admin, it works.

Dont know why it doesnt work as a script, but it works as .exe. But it is important it works. :)
 

Edited by Robert9

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