Jump to content
Sign in to follow this  
MIchaelfjsmith2

Simple Script not running once compiled

Recommended Posts

MIchaelfjsmith2

Can anyone help me i have a simple script that once ran will just either start or kill Pandora depending on is the process exists or not. Script runs fine until compiled.

Thanks,

If ProcessExists("pandora.exe") Then
    ProcessClose("Pandora.exe")
Else
    Run("D:\Program Files\Pandora\pandora.exe")
EndIf

Share this post


Link to post
Share on other sites
water

Is this the full script? I don't see anything that should stop it from running when being compiled.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
MIchaelfjsmith2

Yes this is the full script. works perfect until compiled.

Share this post


Link to post
Share on other sites
water

BTW: What is pandora.exe?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
MIchaelfjsmith2

pandora has a desktop application called pandora one for users that pay for ad free subscription.

Share this post


Link to post
Share on other sites
water

I suggest to add some MsgBox statements so you see where the script runs.

If ProcessExists("pandora.exe") Then
    MsgBox(0, "", "ProcessExists")
    ProcessClose("Pandora.exe")
Else
    MsgBox(0, "", "Starting")
    $iResult = Run("D:\Program Files\Pandora\pandora.exe")
    MsgBox(0, "", "Result of Run: " & $iResult)
EndIF
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
MIchaelfjsmith2

Thanks for the advice after running the newly revised script it is coming up as the process already exists when in fact it doesn't.

Share this post


Link to post
Share on other sites
MIchaelfjsmith2

Thanks for all the help i figured out the issue stupid mistake. my script was called pandora.au3 when compiled it had naming conflict and killed it self off each time. 

Share this post


Link to post
Share on other sites
water

So you were killing yourself ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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
Sign in to follow this  

×