Golbez Posted May 11, 2022 Share Posted May 11, 2022 is there a way to detect if i run my script from scite as a test compared to running a compiled exe? Link to comment Share on other sites More sharing options...
Solution Musashi Posted May 11, 2022 Solution Share Posted May 11, 2022 Check the macro : @Compiled Returns 1 if script is a compiled executable or an .a3x file; returns 0 if an .au3 file. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Golbez Posted May 11, 2022 Author Share Posted May 11, 2022 ty much Link to comment Share on other sites More sharing options...
Developers Jos Posted May 11, 2022 Developers Share Posted May 11, 2022 (edited) This is a UDF to check for running a source file from SciTE with AutoIt3 or directly and determine which one it is: #include <WinAPIProc.au3> If _RunBySciTE() Then MsgBox(0, "Run by SciTE", "This script is ran by SciTE") Else MsgBox(0, "Not Run by SciTE", "This script is not ran by SciTE") EndIf Func _RunBySciTE($iPID = @AutoItPID) Local $n, $iParentPID = $iPID For $n = 1 To 5 If _WinAPI_GetProcessName($iParentPID) = "SciTE.exe" Then Return True $iParentPID = _WinAPI_GetParentProcess($iParentPID) Next Return False EndFunc ;==>_RunBySciTE Jos Edited May 11, 2022 by Jos pixelsearch and Zedna 2 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now