Jump to content

Custom Search settings & shortcut keys


Recommended Posts

Hello everyone,

Sorry if the following is a noob question, I am new to AutoIT and was wondering if anyone can guide me in the right direction of automating something across all computers on my network.

We use a default profile in our environment including custom File Explorer 'View' option like Details view with (Name, Date Modified, Size, File Type & Path of the file instead of Folder) but in Windows 10 the search does not conform to this standard and is always reset to content view, for some reason or the other when user logs off or the computer restarts. so I would like to use AutoIT to configure these options, I used the AutoIT Recorder to record steps to set the settings and when played back the configuration steps are performed on the same computer but when I try the same on another computer the clicks happen somewhere else entirely and does not work. I am guessing this is due to different monitor sizes etc.

So can anyone guide me in the right direction, how do I create the script that does the configuration of View Options on all computers.

On a separate note I'd like to know how to do the following.

Ctrl+Shift+R >Launch a program

Ctrl+Shift+W> launch a explorer shortcut e.g. C:\Windows\

Thanks in advance.

 

Aasim

 

Link to comment
Share on other sites

14 minutes ago, FrancescoDiMuro said:

Hi @AasimPathan, and welcome to the AutoIt forums :welcome:

Maybe, a combination of this, Win* functions, and Send(), could be a possible solution :)

EDIT:

This might be helpful too :)

Hi, Thank you for your response, I've gone through both the links. I think the combinations and shortcuts mentioned to launch View Options would be of great help but I don't think that what I am after, You see to change the View Option that I am looking for I need to go into More and in 'Chose Details' Tab and select 'Path' from the list and unselect folder from that list. Then "Size All Columns to Fit"

image.thumb.png.e3d1fd4acfa906511bdbb5161aea17a5.png

Link to comment
Share on other sites

9 hours ago, Dwalfware said:

"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"

Group Policy editor, check what the key is if not then

Run on login

 

I like this options, export reg, make changes, open reg export

run diff tool , might help but can also kill it so sandox it in a vm or something.

https://superuser.com/questions/253249/windows-registry-entries-for-default-explorer-view

Link to comment
Share on other sites

Hi everyone,

thank you for responding I am going to post the solution I applied to conform to our standards. Instead of using Mouse clicks I used Keyboard Shortcuts. and it has been working fine.

But I sort of have a different issue that I need help with in the same script.

You see I've used a MsgBox that says that it will apply the formatting and the user will get 2 options either OK or Cancel. But for some reason, whether the user presses Ok or cancel it still runs the entire script. I want the script to end if pressed cancelled, I know there is a simple solution for this but for some reason i cannot figure it out for the past 1 hour.

;Script created by Aasim Pathan
;Date 2019-02-18
;Version: 1.0
;Reference:
; https://www.autoitscript.com/autoit3/docs/functions/Send.htm
; https://www.autoitscript.com/autoit3/docs/functions/Sleep.htm
; https://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm
#include <MsgBoxConstants.au3>
ApplySearchViewStandards()
Func ApplySearchViewStandards()
MsgBox($MB_OKCANCEL, "Conform Search Standard in Explorer", "This will apply search standard to your current search view, Please ensure that you are currently in a search result window before clicking on OK,Please do not move your mouse or press any key on the keyboard till the process is complete. Click OK to continue or Cancel to Exit!")
Send("{ALT}V")
Sleep(1000)
Send("L")
Sleep(1000)
Send("{UP}{RIGHT}{ENTER}")
Sleep(1000)
Send("{ALT}VA")
Sleep(1000)
Send("{DOWN}{DOWN}{DOWN}{SPACE}")
Sleep(1000)
Send("{ALT}VA")
Sleep(1000)
Send("{UP}{SPACE}")
Sleep(1000)
Send("path")
Sleep(1000)
Send("{SPACE}{ENTER}")
Sleep(1000)
Send("{ALT}VSF")
MsgBox(1 , "Conform Search Standard in Explorer", "Explorer formatting applied, Please press OK to exit.")
EndFunc

Any help would be appreciated.

Link to comment
Share on other sites

Link to comment
Share on other sites

On 2/18/2019 at 12:43 PM, Dwalfware said:

I like this options, export reg, make changes, open reg export

run diff tool , might help but can also kill it so sandox it in a vm or something.

https://superuser.com/questions/253249/windows-registry-entries-for-default-explorer-view

Yes but it seems like the options that the user wants are not stored in registry.

I used a registry "live scan tool" Procmon, and change some columns in the folder, got nothing useful.

Maybe the only way is by actual interaction with the menus and such.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

It means you have to give the messagebox a variable.

Then the variable will hold the result value, so then the code knows if you pressed one or the other button.

 

$iMsgBoxAnswer = MsgBox(8245, "Startup", "Startup failed! " & @CRLF & "Error Returned: " & @error & @CRLF & "Do you want to retry?")
        Select
            Case $iMsgBoxAnswer = 4 ;Retry
                Init()
            Case $iMsgBoxAnswer = 7 ;No
                Exit
        EndSelect

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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