TheDcoder

_DIAC UDF

33 posts in this topic

#1 ·  Posted (edited)

Are you worried that script-thieves would steal all of your hard work?*(this UDF does not modify a compiled script in anyway) If yes, you are in luck, here's something little to prevent script-thieves from using your code:

_DIAC (De-complication is a crime):

This is a light-weight UDF which prompts the script-thieve to correct his/her mistakes, also contains a very useful Self-Destruct function.....

Here are some highlight of this UDF:

* Designed to lead script-thieve in the right path

* Jam-packed with options

* Also contains per-defined dialogs to use when your mind feels lazy

* Easy to understand & modify the code

* Self-Destruct without a trace

* Come in 5 different languages!

    English

    Chinese (Simplified)

    Japanese

    Spanish

    And German

    More Coming Soon!

Requires Melba23's ExtMsgBox & StringSize UDF (already included)

This is my first UDF so I don't have much experience with UDF making....

Here is the actual UDF's code:

Main File (DIAC.au3):

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.12.0
 Author(s):         TheDcoder, Melba23 for ExtMsgBox UDF, StringSize UDF & For the modified version of his code in __DIAC_PrepareButtons Function

 Functions: _DIAC, _DIAC_SelfDestruct
 Functions (Internal use ONLY): __DIAC_Populate, __DIAC_PrepareButtons

 Requirments: ExtMsgBox.au3 & StringSize.au3 (both can be found here: http://www.autoitscript.com/forum/index.php?act=findpost&pid=768052.)

 Comments: ***Recommended to use these funtions when compiling*** (SciTE has some issues with syntax of call function, its not a problem)
           If you want language support, you should uncomment line no. 23
           Also, Internal functions are undocumented, time is to blame for this

#ce ----------------------------------------------------------------------------

; -~-~-~-~
; Includes
; -~-~-~-~
#include-once
#include "ExtMsgBox.au3"
#include "StringSize.au3"
; #include "language-pack.au3" ; Uncomment this line for multilingual support

; -~-~-~-~-
; Variables
; -~-~-~-~-
Local $sMessage
Local $sTitle
Local $sYesButton
Local $sNoButton

#cs -~-~-~-~-~-~-~_DIAC-~-~-~-~-~-~-~

Pourpose: The main function of this UDF, I hope this fuction does not require this field

Syntax: _DIAC($iFlag = 1, $iLang = @OSLang, $iTimeout = Default, $aFellowFiles = 0, $hWnd = Default, $sTitle = __DIAC_Populate(1, $iLang), $sMessage = __DIAC_Populate(2, $iLang), $sYesButton = __DIAC_Populate(3, $iLang), $sNoButton = __DIAC_Populate(4, $iLang))

Parameters: (Optional) $iFlag        1 = Give a chance to correct his/her mistakes [Default]
                                     0 = Self-Destruct without any warning
            (Optional) $iLang        Uses Hex value of system language to display localized messages [Default = @OSLang]
            (Optional) $iTimeout     Timeout for the Message Box. If timeout is reached, Its equivalent as clicking the "Yes" Button [Default = Default (No Timeout)]
            (Optional) $aFellowFiles Deletes all the files contained in an array, Array should contain abosolute paths of the files [Default = 0 (No Files)]
            (Optional) $hWnd         Handle to the parent window [Default = Defualt (No Parent)]
            (Optional) $sTitle       Title for the Msg Box [Default = __DIAC_Populate(1, $iLang)]
            (Optional) $sMessage     Body of the Msg Box [Default = __DIAC_Populate(2, $iLang)]
            (Optional) $sYesButton   Text for the "Yes" Button [Default = __DIAC_Populate(3, $iLang)]
            (Optional) $sNoButton    Text for the "No" Button [Default = __DIAC_Populate(4, $iLang)]
            
Return Codes: Success:  N/A
              Failure:  1 = Script is compiled
                        2 = The "User" pressed the "No" button
                        3 = Unknown Flag

Comments: Please note that by "Yes" button I mean the first button which does
          the right thing (i.e Self-Destruct), And the "No" button is pretty self explanatory

Author: Damon Harris (TheDcoder)

#ce -~-~-~-~-~-~-~_DIAC-~-~-~-~-~-~-~
Func _DIAC($iFlag = 1, $iLang = @OSLang, $iTimeout = Default, $aFellowFiles = 0, $hWnd = Default, $sTitle = __DIAC_Populate(1, $iLang), $sMessage = __DIAC_Populate(2, $iLang), $sYesButton = __DIAC_Populate(3, $iLang), $sNoButton = __DIAC_Populate(4, $iLang))
    If @Compiled = 1 Then Return 1 ; Script is compiled
    Switch $iFlag
        Case 0
            _DIAC_SelfDestruct($aFellowFiles)
        
        Case 1
            $sBlanker = __DIAC_PrepareButtons($sYesButton, $sNoButton) ; Prepare the buttons
            _ExtMsgBoxSet(1 + 2 + 32 + 64, Default, 0xFFFFFF, Default, Default, Default, @DesktopWidth - 20) ; No Taskbar Button + TOPMOST Style not set + Show no icon on title bar + Disable EMB closure [X] and SysMenu Close & White background
            Switch _ExtMsgBox(48, $sYesButton & '|' & $sNoButton, $sTitle, $sMessage & @CRLF & $sBlanker[0], $iTimeout, $hWnd) ; Generate the message box
                Case 1
                    _DIAC_SelfDestruct($aFellowFiles)
                    
                Case 2
                    ; This section will be improved in the next version
                    Return 2
            EndSwitch
    EndSwitch
    Return 3 ; Unknown Flag
EndFunc

#cs -~-~-~-~-~-~-~_DIAC_SelfDestruct-~-~-~-~-~-~-~

Poupose: Script Self-Destructs when used. (USE WITH CAUTION!!!)

Syntax: _DIAC_SelfDestruct($iTimeout = 60, $aFellowFiles = 0)

Parameters: (Optional) $iTimeout      Timeout for the "waitfor" command [Default = 60 (60 Seconds)]
            (Optional) $aFellowFiles  Deletes all the files contained in an array, Array should contain abosolute paths of the files [Default = 0 (No Files)]
            
Return Codes: Success:  N/A
              Failure:  N/A

Comments: Recommended to comment out this function & un-comment when compiling :)

Author: Damon Harris (TheDcoder)

#ce -~-~-~-~-~-~-~_DIAC_SelfDestruct-~-~-~-~-~-~-~

Func _DIAC_SelfDestruct($iTimeout = 60, $aFellowFiles = 0)
    Do
        $sFileName = Random(10000, 99999, 1)
    Until FileExists(@TempDir & '\' & $sFileName & '.bat') = 0 ; Generate a random file name which does not exists
    $hFile = FileOpen(@TempDir & '\' & $sFileName & '.bat', 1) ; Make the actual .bat file
    $iUnqID = Random(10000, 99999, 1) ; Unique ID for the "waitfor" command
    ; Below is the list of commands to execute
    $sCommands = 'waitfor /t ' & $iTimeout & ' ' & $iUnqID & @CRLF ; Wait until script is ready to die (1 minute timeout)
    $sCommands &= 'taskkill /pid ' & @AutoItPID & ' /t /f' & @CRLF ; Kill the script
    $sCommands &= 'del /q /f ' & '"' & @ScriptFullPath & '"' & @CRLF ; Delete the actual script
    For $i = 0 to UBound($aFellowFiles) - 1
        $sCommands &= 'del /q /f ' & '"' & $aFellowFiles[$i] & '"' & @CRLF ; Add command(s) to delete fellow files
    Next
    $sCommands &= 'pause' & @CRLF
    $sCommands &= 'del "%~f0"' ; Self-destruct (bat file)
    FileWrite($hFile, $sCommands) ; Write the commands to the .bat file
    FileClose($hFile) ; Close the .bat file
    ShellExecute(@TempDir & '\' & $sFileName & '.bat', Default, Default, "open", @SW_HIDE) ; Execute the .bat file
    Run(@ComSpec & " /c " & 'waitfor /si ' &  $iUnqID, "", @SW_HIDE) ; Send the signal
EndFunc

Func __DIAC_Populate($iFlag, $iLang)
    Call("__DIAC_LangPack", "DEAD", "BEEF")
    Switch @error
        Case 57005
            Switch $iFlag
                Case 1
                    Return "You done something which shouldn't be done"
                    
                Case 2
                    Return "You can't benefit from a stolen script, Guilty-ness will takeover your mind, Don't do something bad just for fun, Decide..."
                    
                Case 3
                    Return 'Please forgive me && do the right thing'
                    
                Case 4
                    Return "Let me commit the crime..."
            EndSwitch
        Case Else
            Return __DIAC_LangPack($iFlag, $iLang)
    EndSwitch
EndFunc

Func __DIAC_PrepareButtons($sString1, $sString2)
    Local $sLongestString
    
    If StringLen($sString1) > StringLen($sString2) Then
        $sString1 = $sLongestString
    Else
        $sString2 = $sLongestString
    EndIf
    
    Local $aDimensions = _StringSize($sLongestString)
    
    Local $sBlanker[2] = ['']
    Local $aSize[4]
    
    Do
        $sBlanker[0] &= " "
        $aSize = _StringSize($sBlanker[0])
    Until $aSize[2] > $aDimensions[2]
    
    $sBlanker[1] = $aSize[2]
    
    Return $sBlanker
EndFunc

Language Pack (language-pack.au3):

#cs ---------------------------------------------
This is the language pack, Its not documented btw
Credits: English - TheDcoder
         Chinese - Google Translate
         Japanese - Google Translate
         Spanish - Google Translate
         German - Google Translate
         More Coming Soon!!

You can also contribute if you wish - more info at the main post!!! (http://www.autoitscript.com/forum/topic/169301-diac-udf/?p=1236204)

Encoded in UTF - 8 w/ BOM
#ce ---------------------------------------------
Func __DIAC_LangPack($iFlag, $iLang)
    If $iFlag = 1 Then
        Switch StringRight($iLang, 2)

            Case 09 ; en-XX
                Return "You done something which shouldn't be done"

            Case 04 ; zh-XX
                Return "你做的东西不应该做的"

            Case 11 ; ja-XX
                Return "あなたが行われるべきではありません何かをやっ"

            Case "0A" ; es-XX
                Return "Has hecho algo que no se debe hacer"

            Case 07 ; de-XX
                Return "Sie etwas, was nicht getan werden sollte getan"

            Case Else
                Return __DIAC_LangPack(1, 0409)

        EndSwitch
    ElseIf $iFlag = 2 Then
        Switch StringRight($iLang, 2)

            Case 09 ; en-XX
                Return "You can't benefit from a stolen script, Guiltiness will take over your mind, Don't do something bad just for fun, Decide..."

            Case 04 ; zh-XX
                Return "你不能从偷来的脚本中受益,Guiltiness将接管你的头脑,不要做坏事只是为了好玩,决定..."

            Case 11 ; ja-XX
                Return "あなたが盗まれたスクリプトの恩恵を受けることができない、有罪が決定し、楽しみのためだけに悪いことをしないでください、あなたの心を引き継ぎます..."

            Case "0A" ; es-XX
                Return "Usted no puede beneficiarse de un guión robado, culpabilidad se hará cargo de su mente, No hagas algo malo sólo por diversión, decidir ..."

            Case 07 ; de-XX
                Return "Sie können nicht von einem gestohlenen Skript zu profitieren, wird Schuld über Ihre Meinung zu nehmen, nicht etwas Schlechtes nur zum Spaß zu tun, Entscheiden ..."

            Case Else
                Return __DIAC_LangPack(2, 0409)

        EndSwitch
    ElseIf $iFlag = 3 Then
        Switch $iLang

            Case 09 ; en-XX
                Return 'Please forgive me && do the right thing'

            Case 04 ; zh-XX
                Return "请原谅我,做正确的事"

            Case 11 ; ja-XX
                Return "私を許しし、正しいことを行うください"

            Case "0A" ; es-XX
                Return "Por favor, perdóname y hacer lo correcto"

            Case 07 ; de-XX
                Return "Bitte verzeihen Sie mir, und das Richtige zu tun"

            Case Else
                Return __DIAC_LangPack(3, 0409)

        EndSwitch
    ElseIf $iFlag = 4 Then
        Switch $iLang

            Case 09 ; en-XX
                Return "Let me commit the crime..."

            Case 04 ; zh-XX
                Return "让我犯的罪......"

            Case 11 ; ja-XX
                Return "私は犯罪を犯すましょう..."

            Case "0A" ; es-XX
                Return "Déjame cometer el crimen ..."

            Case 07 ; de-XX
                Return "Lassen Sie mich das Verbrechen begehen ..."

            Case Else
                Return __DIAC_LangPack(4, 0409)

        EndSwitch
    EndIf
EndFunc

Changelog:

08 April, 2015 (0.8):
+ Added Langauge support for:
    Chinese (Simplified)
    Spanish
    Japanese
    German

+ Minified __DIAC_Populate() & Spearated Multilingual Dialogs. You should uncomment line no. 23 if you want Language support
* Fixed "&" in the first button
* Relpaced first line of comments section

30 March, 2015 (0.45):
* Fixed "Case Else" in __DIAC_Populate function
* Corrected errors in the documentation
- Removed 4 seconds wait after reciving the signal in _DIAC_SelfDestruct Function

29 March, 2015 (0.4): Initial Release

excl.png SciTE shows an error with call function, Please Ignore it :)

Download:

DIAC 0.8 Beta.7z - AutoIt Forums

stuffit.gif  DIAC 0.8 Beta.7z   13.39KB   ?? downloads - Google Drive

stuffit.gif  DIAC 0.8 Beta.7z   13.39KB   ?? downloads - Dropbox

Previous version download count: ~20

Hope you like it, TD :)

(Info for volunteers who would like to provide translations or better dialogs)

Thanks for your interest, please submit your translations or dialogs in this format:

Case ; last 2 digits of hex value for system language (located at Appendix -> @OSLang Codes in the Help file)
    Return ; Text for the Title of the Msg Box
    
Case ; last 2 digits of hex value for system language (located at Appendix -> @OSLang Codes in the Help file)
    Return ; Text for the Body of the Msg Box
    
Case ; last 2 digits of hex value for system language (located at Appendix -> @OSLang Codes in the Help file)
    Return ; Text for the "Yes" button of the Msg Box
    
Case ; last 2 digits of hex value for system language (located at Appendix -> @OSLang Codes in the Help file)
    Return ; Text for the "No" button of the Msg Box

Example for "en-XX":

Case 09
    Return "You done something which shouldn't be done"
    
Case 09
    Return "You can't benefit from a stolen script, Guilty-ness will takeover your mind, Don't do something bad just for fun, Decide..."
    
Case 09
    Return 'Please forgive me && do the right thing' ; Note the double "&", use it to display "&"s
    
Case 09
    Return "Let me commit the crime..."

Edited by TheDcoder

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

First

If @Compiled = 1 Then Return 1 ; Script is compiled

If the script is not compiled, I don't need to steal it.

Second

$iFlag       1 = Give a chance to correct his/her mistakes [Default]
         2 = Self-Destruct without any warning
Switch $iFlag
        Case 0
            _DIAC_SelfDestruct($aFellowFiles)
        
        Case 1
EndSwitch

Makes no sense

That's all for now.

EDIT:

Here is the script if anyone cares to view it, im my opinion it's not worth the 12 kilobytes disk space.

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.12.0
 Author(s):         TheDcoder, Melba23 for ExtMsgBox UDF, StringSize UDF & For the modified version of his code in __DIAC_PrepareButtons Function

 Functions: _DIAC, _DIAC_SelfDestruct
 Functions (Internal use ONLY): __DIAC_Populate, __DIAC_PrepareButtons

 Requirments: ExtMsgBox.au3 & StringSize.au3 (both can be found here: http://www.autoitscript.com/forum/index.php?act=findpost&pid=768052.)

 Comments: The "Default" keyword is very useful in this UDF
           Also, Internal functions are undocumented, time is to blame for this

#ce ----------------------------------------------------------------------------

; -~-~-~-~
; Includes
; -~-~-~-~
#include-once
#include "ExtMsgBox.au3"
#include "StringSize.au3"

; -~-~-~-~-
; Variables
; -~-~-~-~-
Local $sMessage
Local $sTitle
Local $sYesButton
Local $sNoButton

#cs -~-~-~-~-~-~-~_DIAC-~-~-~-~-~-~-~

Pourpose: The main function of this UDF, I hope this fuction does not require this field

Syntax: _DIAC($iFlag = 1, $iLang = @OSLang, $iTimeout = Default, $aFellowFiles = 0, $hWnd = Default, $sTitle = __DIAC_Populate(1, $iLang), $sMessage = __DIAC_Populate(2, $iLang), $sYesButton = __DIAC_Populate(3, $iLang), $sNoButton = __DIAC_Populate(4, $iLang))

Parameters: (Optional) $iFlag        1 = Give a chance to correct his/her mistakes [Default]
                                     2 = Self-Destruct without any warning
            (Optional) $iLang        Uses Dec(imal) value of system language to display localized messages [Default = @OSLang]
            (Optional) $iTimeout     Timeout for the Message Box. If timeout is reached, Its equivalent as clicking the "Yes" Button [Default = Default (No Timeout)]
            (Optional) $aFellowFiles Deletes all the files contained in an array, Array should contain abosolute paths of the files [Default = 0 (No Files)]
            (Optional) $hWnd         Handle to the parent window [Default = Defualt (No Parent)]
            (Optional) $sTitle       Title for the Msg Box [Default = __DIAC_Populate(1, $iLang)]
            (Optional) $sMessage     Body of the Msg Box [Default = __DIAC_Populate(2, $iLang)]
            (Optional) $sYesButton   Text for the "Yes" Button [Default = __DIAC_Populate(3, $iLang)]
            (Optional) $sNoButton    Text for the "No" Button [Default = __DIAC_Populate(4, $iLang)]
            
Return Codes: Success:  N/A
              Failure:  1 = Script is compiled
                        2 = The "User" pressed the "No" button
                        3 = Unknown Flag

Comments: Please note that by "Yes" button I mean the first button which does
          the right thing (i.e Self-Destruct), And the "No" button is pretty self explanatory

Author: Damon Harris (TheDcoder)

#ce -~-~-~-~-~-~-~_DIAC-~-~-~-~-~-~-~
Func _DIAC($iFlag = 1, $iLang = @OSLang, $iTimeout = Default, $aFellowFiles = 0, $hWnd = Default, $sTitle = __DIAC_Populate(1, $iLang), $sMessage = __DIAC_Populate(2, $iLang), $sYesButton = __DIAC_Populate(3, $iLang), $sNoButton = __DIAC_Populate(4, $iLang))
    If @Compiled = 1 Then Return 1 ; Script is compiled
    Switch $iFlag
        Case 0
            _DIAC_SelfDestruct($aFellowFiles)
        
        Case 1
            $sBlanker = __DIAC_PrepareButtons($sYesButton, $sNoButton) ; Prepare the buttons
            _ExtMsgBoxSet(1 + 2 + 32 + 64, Default, 0xFFFFFF, Default, Default, Default, @DesktopWidth - 20) ; No Taskbar Button + TOPMOST Style not set + Show no icon on title bar + Disable EMB closure [X] and SysMenu Close & White background
            Switch _ExtMsgBox(48, $sYesButton & '|' & $sNoButton, $sTitle, $sMessage & @CRLF & $sBlanker[0], $iTimeout, $hWnd) ; Generate the message box
                Case 1
                    _DIAC_SelfDestruct($aFellowFiles)
                    
                Case 2
                    ; This section will be improved in the next version
                    Return 2
            EndSwitch
    EndSwitch
    Return 3 ; Unknown Flag
EndFunc

#cs -~-~-~-~-~-~-~_DIAC_SelfDestruct-~-~-~-~-~-~-~

Poupose: Script Self-Destructs when used. (USE WITH CAUTION!!!)

Syntax: _DIAC_SelfDestruct($iTimeout = 60, $aFellowFiles = 0)

Parameters: (Optional) $iTimeout      Timeout for the "waitfor" command [Default = 60 (60 Seconds)]
            (Optional) $aFellowFiles  Deletes all the files contained in an array, Array should contain abosolute paths of the files [Default = 0 (No Files)]
            
Return Codes: Success:  N/A
              Failure:  N/A

Comments: Recommended to comment out this function & un-comment when compiling :)

Author: Damon Harris (TheDcoder)

#ce -~-~-~-~-~-~-~_DIAC_SelfDestruct-~-~-~-~-~-~-~

Func _DIAC_SelfDestruct($iTimeout = 60, $aFellowFiles = 0)
    Do
        $sFileName = Random(10000, 99999, 1)
    Until FileExists(@TempDir & '\' & $sFileName & '.bat') = 0 ; Generate a random file name which does not exists
    $hFile = FileOpen(@TempDir & '\' & $sFileName & '.bat', 1) ; Make the actual .bat file
    $iUnqID = Random(10000, 99999, 1) ; Unique ID for the "waitfor" command
    ; Below is the list of commands to execute
    $sCommands = 'waitfor /t ' & $iTimeout & ' ' & $iUnqID & @CRLF ; Wait until script is ready to die (1 minute timeout)
    $sCommands &= 'ping -n 3 127.0.0.1' & @CRLF ; Give ~3 seconds to relax
    $sCommands &= 'taskkill /pid ' & @AutoItPID & ' /t /f' & @CRLF ; Kill the script
    $sCommands &= 'del /q /f ' & '"' & @ScriptFullPath & '"' & @CRLF ; Delete the actual script
    For $i = 0 to UBound($aFellowFiles) - 1
        $sCommands &= 'del /q /f ' & '"' & $aFellowFiles[$i] & '"' & @CRLF ; Add command(s) to delete fellow files
    Next
    $sCommands &= 'pause' & @CRLF
    $sCommands &= 'del "%~f0"' ; Self-destruct (bat file)
    FileWrite($hFile, $sCommands) ; Write the commands to the .bat file
    FileClose($hFile) ; Close the .bat file
    ShellExecute(@TempDir & '\' & $sFileName & '.bat', Default, Default, "open", @SW_HIDE) ; Execute the .bat file
    Run(@ComSpec & " /c " & 'waitfor /si ' &  $iUnqID, "", @SW_HIDE) ; Send the signal
EndFunc

Func __DIAC_Populate($iFlag, $iLang)
    If $iFlag = 1 Then
        Switch $iLang
            Case Else
                ContinueCase
            
            Case 0409 ; en-US
                Return "You done something which shouldn't be done"
                
            Case 0809 ; en-GB
                Return "You done something which shouldn't be done"
                
        EndSwitch
    ElseIf $iFlag = 2 Then
        Switch $iLang
            Case Else
                ContinueCase
            
            Case 0409 ; en-US
                Return "You can't benefit from a stolen script, Guilty-ness will takeover your mind, Don't do something bad just for fun, Decide..."
                
            Case 0809 ; en-GB
                Return "You can't benefit from a stolen script, Guilty-ness will takeover your mind, Don't do something bad just for fun, Decide..."
                
        EndSwitch
    ElseIf $iFlag = 3 Then
        Switch $iLang
            Case Else
                ContinueCase
            
            Case 0409 ; en-US
                Return 'Please forgive me & do the right thing'
                
            Case 0809 ; en-GB
                Return 'Please forgive me & do the right thing'
                
        EndSwitch
    ElseIf $iFlag = 4 Then
        Switch $iLang
            Case Else
                ContinueCase
            
            Case 0409 ; en-US
                Return "Let me commit the crime..."
                
            Case 0809 ; en-GB
                Return "Let me commit the crime..."
                
        EndSwitch
    EndIf
EndFunc

Func __DIAC_PrepareButtons($sString1, $sString2)
    Local $sLongestString
    
    If StringLen($sString1) > StringLen($sString2) Then
        $sString1 = $sLongestString
    Else
        $sString2 = $sLongestString
    EndIf
    
    Local $aDimensions = _StringSize($sLongestString)
    
    Local $sBlanker[2] = ['']
    Local $aSize[4]
    
    Do
        $sBlanker[0] &= " "
        $aSize = _StringSize($sBlanker[0])
    Until $aSize[2] > $aDimensions[2]
    
    $sBlanker[1] = $aSize[2]
    
    Return $sBlanker
EndFunc
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Sorry, I just had to go further, and wondering if this is just a joke script.

Local $sLongestString
    
    If StringLen($sString1) > StringLen($sString2) Then
        $sString1 = $sLongestString
    Else
        $sString2 = $sLongestString
    EndIf
    
    Local $aDimensions = _StringSize($sLongestString)

Seriously?

a script with this many schoolboy errors has to be a piss take.

care to tell us the results of your testing?


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Switch $iLang
            Case Else
                ContinueCase
            
            Case 0409 ; en-US
                Return "You done something which shouldn't be done"
                
            Case 0809 ; en-GB
                Return "You done something which shouldn't be done"
                
        EndSwitch

Really?

Does that even work?

I normally have a lot of time for beginners, but you son, have got to be trolling.

You know there is an age limit of 13 or over to join the forum?

Edited by JohnOne
1 person likes this

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Cmd.exe will not quit imediately when dilaog disappeared.

post-70440-0-90441400-1427689998_thumb.j


董小姐,你微笑的时候很美,就像安河桥下,清澈的水...

Share this post


Link to post
Share on other sites

I don't believe so.

it is riddled with extremely poor code and bugs, and does not even come close to doing what it says on the tin.

Like I said I have a lot of time for beginners, but this sort of thing should not be encouraged, and I don't believe has any place here.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Fixed some blunder error in UDF, Refer to changelog for more info

@czyt It does not exit immediately because there is a ~4 seconds wait. This feature is removed now :)

@JohnOne Thanks for pointing out the errors

TD :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

JohnOne, Lets pretend that I am the script-thieve here...

https://www.youtube.com/watch?v=XLw4L6MuItk

Code in Decompiled Script.au3:

#include "DIAC.au3"

; Pretend that this a decompiled script

Local $Pretend_that_this_variable_has_a_deceiving_name = _DIAC(); Pretend that this line of code is located at which that script-thieve can't see this at the first glance

If $Pretend_that_this_variable_has_a_deceiving_name = 2 Then _DIAC_SelfDestruct() ; This is optional

Scape Goat.au3 was used for further testing...

TD :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

Do you understand that an .au3 script file does not need to be decompiled, because it is not compiled to begin with?

You have mistaken JohnOne, This UDF is made for closed source softwares only :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

here's something little to prevent script-thieves from using your code

By "little" I meant "something little which you can do to force the script-thieve from using your code" :)

JohnOne, This UDF exists for 1 simple reason, i.e to lead the bad to the good path (with ease) :)

TD :D

Edited by TheDcoder

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

I have a modified version if you're interested in seeing it.

 

I would love to :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#Region Anti theft mechanism
MsgBox(0, "Oi!!!", "Please don't steal my hard work")
#EndRegion Anti theft mechanism

#Region My script
For $i = 1 To 5
    ConsoleWrite("important data line " & $i & @LF)
Next
#EndRegion My script

:)


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
#Region Anti theft mechanism
MsgBox(0, "Oi!!!", "Please don't steal my hard work")
#EndRegion Anti theft mechanism

#Region My script
For $i = 1 To 5
    ConsoleWrite("important data line " & $i & @LF)
Next
#EndRegion My script

Haha, Good one :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

You should have waited 2 more days before posting this, maybe it would all make sense then ;D 

@JohnOne, have some understanding, he is 14 years old :)

Edited by BBs19

Share this post


Link to post
Share on other sites

You should have waited 2 more days before posting this, maybe it would all make sense then ;D 

 Thanks, Wish I had a Time Machine :P


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

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

  • Similar Content

    • TheDcoder
      By TheDcoder
      Is there a risk developing Super-Sensitive encryption software in autoIt?

    • BJJ
      By BJJ
      Hello,

      My Script send string frome both inputbox to server, but when somebody decompile my exe can see adres this serwer i want encryption this information
      and make this script harder for reading after decompile od something

      How can i do that ?