Sign in to follow this  
Followers 0
RayRay

Explorer window

3 posts in this topic

Our users are locked down and I'm writing a script to allow some to delete ActiveX controls out of c:\windows\downloaded program files (I'll RunAsSet to give rights). I have the code below, however, it still allows user to navigate away from the folder. Otherwise, this would work. Anyone have a suggestion? (I did get this code from the forum, saved me some work!)

CODE
#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 450, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))

$Obj1 = ObjCreate("Shell.Explorer.2")

$Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908)

GUISetState(@SW_SHOW)

$Obj1.navigate2("c:\windows\downloaded program files")

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Thanks for any help

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

WinSetOnTop and _MouseTrap to the Client coords of your GUI?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

WinSetOnTop and _MouseTrap to the Client coords of your GUI?

Didn't get a chance to try until today. That's an interesting way to do exactly what I wanted. Thanks for the help.

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  
Followers 0