Jump to content
Sign in to follow this  

getting value

Recommended Posts

Cant figure this out. I want the script to read the value taskbarsizemove, if its "0" then it should do my function _explorer() and perform my function _taskbarsizemove() and if it returns if the number "1" from this HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove" it shall do nothing and continue with the script.

$taskbarsizemove = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove")

If @error = 0 Then



Else ; registry ValueName NOT exist

$taskbarsizemove = "nothing?"


FUNC _explorer()

;End Windows Explorer.

While ProcessExists ( "explorer.exe" )

ProcessClose ( "explorer.exe" )


Sleep ( 5000 )

;Check for Explorer if not started - then start

While Not ProcessExists ( "explorer.exe" )

Run ( @WindowsDir & "\explorer.exe" )

Sleep ( 3000 )



FUNC _taskbarsizemove()



Help me hardcore autoit experts :).

also is there any better way to code/clean this code up abit please show what else it could look like.

Share this post

Link to post
Share on other sites

No need for functions for those few tasks

$Taskbarsizemove = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove")
If $Taskbarsizemove = 0 Then
    Until Not ProcessExists("explorer.exe")
    RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSizeMove", "REG_DWORD", "1")
    If Not ProcessWait("explorer.exe", 5) Then Run(@WindowsDir & "\explorer.exe")

EDIT: I did not include any checks for @error on the RegRead() or RegWrite()...you can check the Help file for those functions and decide if you want to add/change any code if @error is detected (and for different @error values)

Edited by Varian

Share this post

Link to post
Share on other sites

Both of your suggestions worked great, yet again thanks guys!. sorry i havnt replyd before now, i simple didnt have the time for it!.

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