Jump to content

How can I make the script end after it closed the processes?


Recommended Posts

How can I make the script end after it closed the processes?

Run("C:\Program Files\ShareX\ShareX.exe")
Run("C:\Program Files\CPUID\GwentTracker\Gwent_Tracker.exe")
Run("C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe")

WinWaitActive("[CLASS:GalaxyClientClass]","","100")
Sleep (700)
MouseClick("right", 265, 263, 2, 1)
Sleep (300)
MouseClick("left", 325, 274, 2, 1)
Sleep (10000)
MouseClick("left")
Sleep (250)
MouseClick("left")
Sleep (250)
WinClose("[CLASS:GalaxyClientClass]")
While 1
   If ProcessExists("Gwent.exe") Then
      Else
            ProcessClose("ShareX.exe")
            ProcessClose("Gwent_Tracker.exe")
            ProcessClose("GalaxyClient.exe")
   EndIf
WEnd

 

 

Edited by Jos
Added code box and question from title
Link to comment
Share on other sites

  • Developers

@tharos96

Please ensure you read our forum rules before continuing posting in our forums as it seems your question is game related.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...