Jump to content
Sign in to follow this  
Enforcer

Stringreplace in opened file...

Recommended Posts

Enforcer

Hi all, here what i'm truing to do:

Open exe file by simple function - file open...

Then I need to replace some strings in it, and then simple close it, without writing other file...

Can I do this somehow ?...

Because then I will need to replace those strings back without file corrupt...

Why I chosed exe file ? because there exist all kind of chars... and if some char will be replaced unkorect, file will be broken...

Please help... And sorry for my English I know its bad but i really cant solve that problem by myself...


[RU] Zone

Share this post


Link to post
Share on other sites
SmOke_N

Hi all, here what i'm truing to do:

Open exe file by simple function - file open...

Then I need to replace some strings in it, and then simple close it, without writing other file...

Can I do this somehow ?...

Because then I will need to replace those strings back without file corrupt...

Why I chosed exe file ? because there exist all kind of chars... and if some char will be replaced unkorect, file will be broken...

Please help... And sorry for my English I know its bad but i really cant solve that problem by myself...

Why are you editing an executable file?

Those files are written in binary, you'll need to play with the binary functions in the help file, and open the files in binary mode as well.

See:

FileOpen()/FileRead()/*Binary* functions

In the help file.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Enforcer

Hm interesting, eny idea how to replace strings in binary mode ?))


[RU] Zone

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  

×