Golbez 2 Posted May 11 Share Posted May 11 is there a way to detect if i run my script from scite as a test compared to running a compiled exe? Link to post Share on other sites
Solution Musashi 632 Posted May 11 Solution Share Posted May 11 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 post Share on other sites
Developers Jos 2,662 Posted May 11 Developers Share Posted May 11 (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 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 post Share on other sites
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