ThiagoJunqueira Posted December 12, 2012 Posted December 12, 2012 Hi \o/,This is possible ? I want to replace the words between "Example:Send("hello")toSend(_StringEncrypt(0, "CE799A989735BFE8AB68", "thi", 1))I have a code, but i need to select the words ..Has some method to automatize this ?My code: #Include <String.au3> HotKeySet("{F2}", "_Funciona") HotKeySet("{ESC}", "_Sair") Global $a, $b, $c[/size] [size=4]While 1 Sleep(20) WEnd[/size][size=4]Func _Funciona() Send("^c") Send("{BACKSPACE}") $a = ClipGet() $b = _StringEncrypt(1, $a, "thi", 1) $c = '_StringEncrypt(0, ' & '"' & $b & '"' & ', "thi", 1)' Send("{RIGHT}") Send("{BACKSPACE}") Send("{BACKSPACE}") ;~ Send($c) ClipPut($c) Send("^v") EndFunc[/size] [size=4]Func _Sair() Exit EndFuncThank you !
ThiagoJunqueira Posted December 12, 2012 Author Posted December 12, 2012 Use StringReplace() function.But how can i know what is between " ?
DicatoroftheUSA Posted December 12, 2012 Posted December 12, 2012 Search this forum on how to use regular expressions. Statism is violence, Taxation is theft. Autoit Wiki
Moderators Melba23 Posted December 12, 2012 Moderators Posted December 12, 2012 ThiagoJunqueira,_StringBetween will give you the text between matching " ". 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
ThiagoJunqueira Posted December 12, 2012 Author Posted December 12, 2012 Hmm, thanks The _StringBetween, gave me all the text between " " *---*But to replace to, _StringEncrypt[...], how can i do ?i don't know how manipulate arrays ):
Moderators Melba23 Posted December 12, 2012 Moderators Posted December 12, 2012 ThiagoJunqueira,Where in that script you posted is there an array? Please explain clearly what you are trying to do because at the moment I have very little idea - which makes offering any help a bit difficult. M23P.S. And please stop putting every other word in bold - it is very annoying. 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
ThiagoJunqueira Posted December 12, 2012 Author Posted December 12, 2012 Sorry for this, i will stop.The _StringBeetween, returns an array correct ?The Ideia: I will select a project .au3, and automatic will encrypt the text between " ", and later i will try with $ variablesGot it? *-*
Moderators Melba23 Posted December 12, 2012 Moderators Posted December 12, 2012 ThiagoJunqueira, I take it that you are trying to make your script difficult to understand if decompiled. Jos' Obfuscator is very likely be a better way - have you looked at it? 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
ThiagoJunqueira Posted December 12, 2012 Author Posted December 12, 2012 (edited) Cool, i used obfuscator, but the obfuscator changed all my source O_O I only want to change only the " " to encrypt kk and $ Edited December 12, 2012 by ThiagoJunqueira
Moderators Melba23 Posted December 12, 2012 Moderators Posted December 12, 2012 ThiagoJunqueira,If you insist on doing it your own way, then I suggest you read your .au3 file into an array with _FileReadToArray. Then loop through the array, using StringBetween on each element and then StringReplace to each found element to replace the literal string with its encrypted version. Finally use FileWriteFromArray to rewrite the file. Good luck - personally I would stick with Obfuscator. 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
Developers Jos Posted December 12, 2012 Developers Posted December 12, 2012 Trying to understand here what the real requirement is of all of this.... making it more secure or something? 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.
ThiagoJunqueira Posted December 12, 2012 Author Posted December 12, 2012 Yes (: Thank's everybody *-*
Developers Jos Posted December 12, 2012 Developers Posted December 12, 2012 Yes (:When that was a reply to me that let me wake you up and give you some sense of reality: Whatever you do you will never make it safe. As long as you keep that in mind you are safe.Jos 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.
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