Sori

Running AU3 working, but not EXE

3 posts in this topic

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.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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.

Share this post


Link to post
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