Jump to content

i need convert vbs to au3 please


Recommended Posts

i need convert this code to au3 please 

 

Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
Set Command1 = WScript.CreateObject("WScript.Shell")
Check = Command1.RegRead(Hidden)
If Check = 2 Then
Command1.RegWrite Hidden, 1, "REG_DWORD"
Else
Command1.RegWrite Hidden, 2, "REG_DWORD"
End If
Command1.SendKeys "{F5}"

 thanks

Link to comment
Share on other sites

6 minutes ago, Earthshine said:

i read that but i don't know how i convert this code to au3 

this my 3th day learn autoit 

can you help me 

Link to comment
Share on other sites

I posted the links you need to read. Look at the examples in the links. try this. then use your registry path. develop as you go.

#include <MsgBoxConstants.au3>

Local $sVar = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox($MB_SYSTEMMODAL, "Program files are in:", $sVar)
Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

9 minutes ago, Earthshine said:

I posted the links you need to read. Look at the examples in the links. try this. then use your registry path. develop as you go.


#include <MsgBoxConstants.au3>

Local $sVar = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox($MB_SYSTEMMODAL, "Program files are in:", $sVar)

can you help me to convert it ?

Link to comment
Share on other sites

I am trying to help you learn how to do it for yourself. so, you learn. you have the algorithm from the previous code. start writing autoit script and post your code. we can help with that. 

 

1) check if registry key exists

2) if yes then write value

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • Moderators

@Mandolen11 as people have been kindly trying to point out to you, this forum is for helping people with their scripts. It is not a place where you demand something and someone barfs up the code for you. If you are intelligent enough to understand VBS you should have no problem with AutoIt. So if you want help, show us what you have tried from the help file on your own; treat this like Math class and show your work ;)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...