Jump to content

Running AU3 working, but not EXE


Sori
 Share

Recommended Posts

AutoItSetOption("WinTitleMatchMode", 2)

;If Firefox is not open, open it with a new tab
If ProcessExists("Firefox.exe") = 0 Then
    Run('"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-tab about:newtab')
Else ;Switch to Firefox
    WinActivate("Mozilla Firefox")
EndIf

 

Specifically, line 5.

If I run the au3 file, it will open firefox. But, if I compile the script and run the exe, it won't.

No issues with winactivate in either case.

 

sidenote:

Not a big issues, since I can still use the au3 with my keyboard buttons, but I'm curious as to a real fix.

Firefox.au3

If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Link to comment
Share on other sites

In such a case you need to do some error checking.
Does the process exist? What is the return value of "Run" or WinActivate?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

My momma must have dropped me on my head xD

The file I created is named, "firefox" so it's detecting itself.

 

Where did the solved button go?

Edited by Sori

If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

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