AutoHotkey Community

It is currently May 27th, 2012, 10:12 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: June 22nd, 2011, 7:20 pm 
Offline

Joined: April 21st, 2007, 9:16 pm
Posts: 178
Hum, I don't like the methods that open a window to manipulate it. It's dangerous, subject to change from OS to OS, and inelegant.

My method is much more clean, and is much simpler. If the code is longer, it's only because my script offers to toggle the Show Hidden Files AND Show System Files independently, and most of the code is needed only for the tray menu and the command line arguments. In fact, the method is entirely contained in the two functions ShowHiddenFiles(mode) and RefreshExplorerWindows(). Approximately 20 lines of code. The rest is pure cosmetics, that you can easily remove if you just want to change the Hidden Files mode with a hotkey.

_________________
r0lZ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 23rd, 2011, 5:44 am 
Offline
User avatar

Joined: June 22nd, 2011, 4:02 pm
Posts: 171
r0lZ wrote:
Hum, I don't like the methods that open a window to manipulate it.

Point taken, but I don't like directly manipulating the Registry. A mistake doing that can botch up the whole system.

r0lZ wrote:
It's dangerous

I don't think there is much risk in sending keys to the folder options dialog.

r0lZ wrote:
subject to change from OS to OS

The Registry is also subject to change from OS to OS

r0lZ wrote:
and inelegant.

Well, that's a matter of opinion. I prefer the simplest solution that works for the task at hand.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2012, 3:44 am 
Offline

Joined: April 12th, 2010, 9:39 am
Posts: 26
Thank you r0lZ. You made wonderful script! Works correct on Win7 x64 with Autohotkey_L x64


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2012, 7:15 am 
Offline

Joined: April 21st, 2007, 9:16 pm
Posts: 178
rbrtryn wrote:
Point taken, but I don't like directly manipulating the Registry. A mistake doing that can botch up the whole system.

That's theoretically right but only when you manipulate critical parts of the registry, such as HKLM. It's not the case here.


rbrtryn wrote:
r0lZ wrote:
It's dangerous

I don't think there is much risk in sending keys to the folder options dialog.

Again, theoretically right, but your script doesn't send the key to the option dialog. It opens it, then send the key. Although it may work fine 999 times/1000, it is not impossible that another window opens just when the key is sent, and that new window will receive it instead ot the option dialog. Sending keys blindly is always dangerous. My script uses ControlSend, so there is no risk to sent the key to another window.

rbrtryn wrote:
r0lZ wrote:
subject to change from OS to OS

The Registry is also subject to change from OS to OS

Right, but your script uses the registry too.

rbrtryn wrote:
r0lZ wrote:
and inelegant.

Well, that's a matter of opinion. I prefer the simplest solution that works for the task at hand.

IMO, the simplest solution is mine. Writing the correct value to the registry is direct, and it will work regardless of the system load and minor GUI changes. Your script is actually using the GUI to write the same value to the registry. One additional step, useless and prone to various problems. Also, I think that opening a window or popup menu just to send it a key doesn't look professional, and in that sense, it's inelegant.

SinTroN wrote:
Thank you r0lZ. You made wonderful script! Works correct on Win7 x64 with Autohotkey_L x64

Thanks! :-)

_________________
r0lZ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: specter333, XX0 and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group