qwee Posted November 2, 2009 Share Posted November 2, 2009 Hey!Question #1:I only want the "real" script to run if a specific window is open, here is my code (remade):While 1 If WinActivate("Untitled - Notepad") Then While 2 run("mspaint.exe") WEnd Else Sleep(10) EndIf WEndSo if the current active window is "Untitled - Notepad" I want the script to start mspaint.exeQuestion #2:I want to crypt my sourcecode, so other users can't just open it and read the text with a decompiler for autoit. Is there any UDF, if it is, how do I install it?Thanks in advance! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 2, 2009 Moderators Share Posted November 2, 2009 qwee,Q1. The loop is simpler than you think: ; your code gets to where it waits for Notepad to open While 1 If BitAND(WinGetState("Untitled - Notepad"), 8) = 8 Then Run("mspaint.exe") ExitLoop EndIf WEnd ; your code continues on its way with both Notepad and Paint openYour 2 loops will produce quite a few Paint windows - I did not try it to find out exactly how many! Q2. Searching the forums will provide you with a lot more information in greater detail, but in brief:- Your plain language script is within the compiled .exe, but in compressed form. It is not immediately viewable with a hex editor, but is by no means secure as it is expanded in memory when the .exe is run.- Obfuscator (part of the full SciTE4AutoIt3 package) will obscure your script by changing variable and constant names (and a lot more!), which makes it harder to decompile but again does not render the .exe secure.So, compiling an Autoit script will prevent quick snooping, but a determined, experienced hacker can relatively easily get your source - including passwords, specific filenames, etc.And a word of caution - even mentioning AutoIt decompilers here is frowned upon as official decompilers went out with v3.2.6.0 - since then such things are very much off-limits. Do NOT post links or even ask about them again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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