Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Windows XP Hiding icons work-around script


  • Please log in to reply
5 replies to this topic
evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
Sometimes Windows XP loses tray icons when the computer is set to automatically log on (I used to have this problem so I stopped using the auto-hide feature since i didn't know what caused it before, but recently read it was the automatically loging on bit that cause it).

Anyhow, I wrote a short (and rather unsophisticated) script to put in the startup folder so that it goes into the taskbar properties and turns on the tray auto-hiding once windows starts up, but sets the registry entry to turn it off so that the next time windows starts, the auto-hiding has been reset so icons aren't lost and the tray can be set to auto-hide again safely.

I haven't had a chance to really test it out on a reboot as I don't reboot often, but running it works fine (just don't know if it fixes the lost icons for definite).

Here it is:

;Turn on auto-hide icons but set it off in registry for next reboot to prevent lost icons from auto-log on

Run, RunDLL32.EXE shell32.dll`,Options_RunDLL 1
WinWait, Taskbar and Start Menu Properties
Sleep, 100
Control, Check,, Button7, Taskbar and Start Menu Properties ; Tick hide inactive icons
 Sleep, 100
ControlSend, Button11, {SPACE}, Taskbar and Start Menu Properties ; OK
Sleep, 100
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer, EnableAutoTray, 0


SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
Dear evl,

In Win 98 SE, the Auto Hide is automatically unchecked after re-booting from 'safe-mode'.
I would like to check it "on" from a script
Run, RunDLL32.EXE shell32.dll`,Options_RunDLL 1
The above options does not work in WIN 98, can you suggest me of an another way
(other than going through the start menu)... Please...
:roll:
kWo4Lk1.png

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
Sorry, I think this dll call exists only for Windows 2000 onwards from what I found.

Rnon
  • Guests
  • Last active:
  • Joined: --
got the same error on two Win2k stations as well (works on XP)

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
Apparently it's for WinXP onwards only:
http://www.dx21.com/... ... 92&CMD=P-A

I'm not aware of an equivalent for Win2000 or below. You'd probably have to try sending the Appskey (I think it's called - next to the right-hand windows key) to the taskbar, then "r" to display the properties.

Tiger-Heli
  • Members
  • 5 posts
  • Last active: May 06 2011 11:01 AM
  • Joined: 05 Feb 2007
Okay, this is more of a curiosity question at this point, as the script above looks like it will do exactly what I want a lot more elegantly. (I am using WinXP).

I was trying to come up with a way to do this manually, and came up with the following:

The Keyboard commands to do this are:
Left Window Key
S - Settings
T - Taskbar and Start Menu
U - Autohide the Taskbar
Enter - Apply the change and close the Taskbar Properties form.

The commands should be the same to hide or unhide the taskbar.
The script I wrote is called Taskbarhide.ahk and looks like:
#SingleInstance Force
send,{LWIN}stu
send,{ENTER}
Exit
(I also tried without the #SingleInstance Force, and with separate send lines for each keypress.) About every 5th time I run it it will hide the taskbar, and once it is hidden I have never had it successfully unhide it.

Based on the above suggestion, I modified the code to add Sleep, 100 between each Send statement, and now after it is supposed to send the U, the checkbox does not change, although it does if I press U manually.

This is about as basic as AHK gets . . . At this point, I am just curious why it is not working?