Jump to content

Recommended Posts

Posted

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!

  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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
  • Recently Browsing   0 members

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