Sign in to follow this  
Followers 0
qwee

2 Questions!

2 posts in this topic

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
WEnd

So if the current active window is "Untitled - Notepad" I want the script to start mspaint.exe

Question #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!

Share this post


Link to post
Share on other sites



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 open

Your 2 loops will produce quite a few Paint windows - I did not try it to find out exactly how many! B)

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  
Followers 0