Sign in to follow this  
Followers 0
ThiagoJunqueira

Beetween " replace

14 posts in this topic

Hi \o/,

This is possible ? :graduated:

I want to replace the words between "

Example:

Send("hello")

to

Send(_StringEncrypt(0, "CE799A989735BFE8AB68", "thi", 1))

I have a code, but i need to select the words ..

Has some method to automatize this ?

My code: :oops:

#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
EndFunc

Thank you ! :ILA3:

Share this post


Link to post
Share on other sites



Use StringReplace() function.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Use StringReplace() function.

But how can i know what is between " ?

Share this post


Link to post
Share on other sites

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._______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

Hmm, thanks :D

The _StringBetween, gave me all the text between " " *---*

But to replace to, _StringEncrypt[...], how can i do ?

i don't know how manipulate arrays ):

Share this post


Link to post
Share on other sites

ThiagoJunqueira,

Where in that script you posted is there an array? :huh:

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. :)

M23

P.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._______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

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 $ variables

Got it? *-*

Share this post


Link to post
Share on other sites

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._______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

#10 ·  Posted (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 by ThiagoJunqueira

Share this post


Link to post
Share on other sites

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._______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

Trying to understand here what the real requirement is of all of this.... making it more secure or something?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yes (:

Thank's everybody *-*

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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