Jump to content
Sign in to follow this  
Grof

Registry (let start!).

Recommended Posts

I have read the material you suggested me about Registry operation.


DXRW4E wrote:

https://www.autoitscript.com/forum/topic/165359-saverestore-registry-keysubkey/

a function that appeal the Windows API, and I prefer don't use it.

erik7426 wrote:
https://www.autoitscript.com/forum/topic/155603-copy-registry-keyvalues-in-hkcu-to-another-user/

The first one "finds the "Name" and the "Data".
The second "match a SID to a user profile".
The third "a function to add a printer to a user".
The fourth "quick example of using @extended to determine the type of the value".

About:
https://www.autoitscript.com/forum/topic/70108-custom-registry-functions-udf/

I've downloaded the _RegFunc.au3, but I don't know how use it,
Is there a tutorial about UDF functions?

Remember: I'm not a professional programmer, I don't want learn everything about AutoIt programmation, and are 15 years I don't coding... (and was VisualStudio).

Edited by Grof

Share this post


Link to post
Share on other sites

if you can't understand how to use a udf by looking at it's code, then you need to admit that programming in autoit, or any language is something you can do. so far, it doesn't look promising.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

Either open _RegFunc.au3 manually in Scite

Or method I normally use for future reference:

  • Type: #include "_RegFunc.au3" ;~ Assumes _RegFunc.au3 is in the same folder as the script
  • Place your cursor on "_RegFunc.au3"
  • Click: Alt + I

You should notice that the majority of the functions have a header describing what it does, the syntax and parameters and what each parameter is.  It also gives you the return values so you can see if it was successful or if it failed and why it failed.  Some functions like _RegEnumKey, _RegRead or _RegWrite can be ignored and just use the builtin functions.

Share this post


Link to post
Share on other sites
22 minutes ago, Grof said:

Remember: I'm not a professional programmer,

That's how we all started. ;) 

22 minutes ago, Grof said:

I don't want learn everything about AutoIt programmation, and are 15 years I don't coding..

That is the wrong attitude to get this project going ....  Either have the urge to learn or simply don't bother. 

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

Share this post


Link to post
Share on other sites

Some suggestions you gave me I had suppose...

I have written (and this is the only code):

 

#include _RegFunc.au3   (regfunc in black. I have tryed  also #include <_RegFunc.au3> and in this case regfunc was red)


Local $REGISTRYKEY1 = "HKEY_CURRENT_USER\Software\MyApp"

Local $PORTABLEKEY1 =    Backup\MyApp.reg

Call ("_RegMoveKey", $REGISTRYKEY1, $REGISTRYKEY1 & "-Backup")


Call ("_RegCopyKey", $PORTABLEKEY1, $REGISTRYKEY1)

 

 

1) following Subz Click over Alt+I nothing happens (in both cases).

Opening .au3 I have seen these functions, and I have tryed this code.

 

I don'know if it is good because compiling project return error:

 

#include <Constant.au3>

Error opening the file.

I HAVEN'T USED <Constant.au3>!!!

 

2) The key reference requires double quote or not?

3) the path have to be double quoted?

 

There are other syntax errors?

Edited by Grof

Share this post


Link to post
Share on other sites

I was forgetting...

 

"if you can't understand how to use a udf by looking at it's code, then you need to admit that programming in autoit, or any language is something you can do. so far, it doesn't look promising".

True, but I'm working on it!

"That's how we all started".

I DON'T WANT... My brain is not infinite (the astrophisics says neither the universe is infinite)...

It's better avoid headache!

 

 

P.S. I have found in RegFunc.au3 the call to Constant.au3, but I have fount also "#include-once".

What have I to do about it???

 

I have downloaded many .AU3 finally exit error on RegFunc at line 268 (unterminated String)

 

Line 268 in regfunc is:

 

; ========================================================================

Edited by Grof

Share this post


Link to post
Share on other sites

Is in the message above... (there are two messages)

 

#include _RegFunc.au3   (regfunc in black. I have tryed  also #include <_RegFunc.au3> and in this case regfunc was red)


Local $REGISTRYKEY1 = "HKEY_CURRENT_USER\Software\MyApp"

Local $PORTABLEKEY1 =    Backup\MyApp.reg

Call ("_RegMoveKey", $REGISTRYKEY1, $REGISTRYKEY1 & "-Backup")


Call ("_RegCopyKey", $PORTABLEKEY1, $REGISTRYKEY1)

Share this post


Link to post
Share on other sites

that's not the way to post code by the way, you use the <> code brackets

I would not use call at all.

what you provided DOESN'T compile. starting with line 1. Let's see how far you get.

eh, on second thought, why bother.... 

#include "_RegFunc.au3"

Local $REGISTRYKEY1 = "HKEY_CURRENT_USER\Software\MyApp"
Local $PORTABLEKEY1 =    Backup\MyApp.reg

Call ("_RegMoveKey", $REGISTRYKEY1, $REGISTRYKEY1 & "-Backup")
Call ("_RegCopyKey", $PORTABLEKEY1, $REGISTRYKEY1)

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
1 hour ago, Grof said:
#include _RegFunc.au3   (regfunc in black. I have tryed  also #include <_RegFunc.au3> and in this case regfunc was red)
Local $REGISTRYKEY1 = "HKEY_CURRENT_USER\Software\MyApp"
Local $PORTABLEKEY1 =    Backup\MyApp.reg
Call ("_RegMoveKey", $REGISTRYKEY1, $REGISTRYKEY1 & "-Backup")
Call ("_RegCopyKey", $PORTABLEKEY1, $REGISTRYKEY1)

 

When this is your actual current "best" code then I would urge you to spent time and do learn the language basics or else please stop bugging use with these posts trying to lure us in coding it for you.
I am sorry, but you have not shown any interest in learning, and actually stated as such in the first post, so why should we even bother reading these posts?

Jos

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

Share this post


Link to post
Share on other sites
3 minutes ago, Jos said:

 why should we even bother reading these posts?

Jos

Because he's funny ? :D

 

*gets more popcorn...*


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites
1 minute ago, Werty said:

Because he's funny ? :D

Could me my (lack off) sense of humor, but I find it pretty annoying having seen somebody posting BS for 40+ post now aboth making portable applications and messing with the registry and than producing the above code.  Anybody that really wanted to be taken seriously would have done effort to produce something that would generate trust and trigger others to participate.

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

Share this post


Link to post
Share on other sites
3 minutes ago, Earthshine said:

seems like a blind person that doesn't want to learn braille. 

Look at this! said the blind to the deaf. :D


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites

"When this is your actual current "best" code then I would urge you to spent time and do learn the language basics".

You have reason.

I have searched in the web and I have found only:

https://www.autoitscript.com/autoit3/docs/functions/Call.htm

That could be adaptable o this field.

 

I have asked if someone know specific tutorial, but noone noticed me.

 

About "I don'Want learn..." I know how programmers thinks in their mind (I'm active in many forums).

I'm curious and interexted in many things, but I have a learning style that "conflict" with the conventional rules.

 

I wish You (everyone) will continue to help me , I'm so close to my goal.

I promise to be more disciplined in the future!

 

For Eartshine "what are they for regmove and regcopy":

As I have written:

Following Subz (Click over #include <_RegFunc.au3>, Alt+I (In Scite)) nothing happens...

The same without click.

Edited by Grof

Share this post


Link to post
Share on other sites

i wish that when you ignored a person you could ignore (mask off all of) their posts to the forums too. this is hopeless. i don't believe you were ever a developer either--else you would understand the very basics of programming.

you don't even read my posts, i gave you a compile-able script, see, you don't even do any work. pure laziness.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
3 minutes ago, Grof said:

I have asked if someone know specific tutorial, but noone noticed me.

Not true... you have been pointed many times in the right direction but probably do not understand enough to see that right direction.
Have you even bothered to open the helpfile and study the language basics? 
Have you looked at the Wiki to read through all information available there?
I understand it is all English, which isn't your native language, but that means you even need to try harder, as we all needed to do when starting as I am not a native English speaker either. 

5 minutes ago, Grof said:

About "I don'Want learn..." I know how programmers thinks in their mind (I'm active in many forums).

I'm curious and interexted in many things, but I have a learning style that "conflict" with the conventional rules.

You still don't seem to want to learn, and as this is a forum that helps people to learn, you probably need to go somewhere else to get somebody to do the coding for you and pay them.  You also are avoiding the statement/question I have made already 2 time, where you claim no intention to have to learn AutoIt3.
If that is true why are you here?

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

Share this post


Link to post
Share on other sites

I don't ignore you , and I'm sorry if you believe it.

There are two type of problem:

1) As you have seen, I don't speak english so well (and sometimes I'm not so clear).

2) I'm tryin to learn, but remember that the fist time I opened AutoIt was 2 days ago.

 

About "what you provided DOESN'T compile. starting with line 1. Let's see how far you get".

You are saying to edit line by line? First only the first, then two lines and so on?

 

Thanks.

Share this post


Link to post
Share on other sites

Another problem is the crossing messages.

Who read can't understand what we are talking about...

 

Not true... you have been pointed many times in the right direction but probably do not understand enough to see that right direction.
Have you even bothered to open the helpfile and study the language basics? 
Have you looked at the Wiki to read through all information available there?

1) I have been pointed... But if I'm not going mean I haven't seen this direction.

2) I have read the help file (not in the app, online, the forum, and everything I culd find. All day long.

3) I have searched EVERYWHERE. You could blame my result, not my engagement.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...