Jump to content

mr-es335

Active Members
  • Posts

    522
  • Joined

  • Last visited

Everything posted by mr-es335

  1. pixelsearch, You stated, "Does the presence of a 4th parameter in the function answers your new question?" • Firstly, I do observe that, "Using a nonexistent root dir will also cause the Desktop folder to be used." • The employment of the 4th parameter does redirect the path from the Desktop to the redirected path. Just to note: Func AboutMe() MsgBox(64, "About!", "Guitar Rig 5 Development Menu" & @CRLF & _ "" & @CRLF & "Version 2.0" & @CRLF & _ "" & @CRLF & _ "Copy Right© 2025 Dell Krauchi" & @CRLF & _ "" & @CRLF & _ "Original concept by Dell Krauchi" & @CRLF & _ "Developed specifically for use with the Live_Rig..." & @CRLF & _ "...and Gutar Rig 5!" & @CRLF & _ "" & @CRLF & _ "Many, many, many thanks to pixelsearch!" & @CRLF & _ "His fortitude and assistance was invaluable..." & @CRLF & _ "...to the completion of this project!" & @CRLF & _ "" & @CRLF & _ "April 19th, 2025" & @CRLF & _ "") EndFunc ;==>AboutMe ; ----------------------------------------------- Thank you!
  2. pixelsearch, Thanks for the "tip"!! How is this [...greatly simplified...]: ; ----------------------------------------------- #include <File.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- BrowseForFolder() ; ----------------------------------------------- Func BrowseForFolder() Local $sSelectedFolderPath = FileSelectFolder("Select an existing folder, or create a new folder.", "E:\Text\Native Instruments\Guitar Rig 5\Presets") Local $iFileExists = FileExists($sSelectedFolderPath) ; ----------------------------------------------- If $iFileExists Then BackupSoundData($sSelectedFolderPath) EndIf EndFunc ;==>BrowseForFolder ; ----------------------------------------------- Func BackupSoundData($sSelectedFolderPath) Local $sSrcPath = "E:\Text\Native Instruments\Guitar Rig 5\Sounds\*.ngrr" ; ----------------- Local $sDstPath = $sSelectedFolderPath ; ----------------- FileCopy($sSrcPath, $sDstPath, $FC_OVERWRITE) EndFunc ;==>BackupSoundData ; ----------------------------------------------- Question, "What do I do if the "Select Folder" option is selected - with no folder previously selected?"
  3. Jos, Thank you for the reply...appreciated! You noted, "Assistance with what exactly ?" In short, to backup predetermined source data to either a1) a previously determined backup location, or b1) to a new backup location. Well, in the following excerpt, the "ListBackupFolders()" function lists the folders from a per-determined location. This is fine! However, I would prefer to be able to a2) select from the listing, employing that selection as the backup path [thus, (a1) above], or b2) to create a new destination backup path [thus (b1) above]. I do hope that this all makes sense? Here is the excerpt: ; ----------------------------------------------- #include <Array.au3> #include <AutoItConstants.au3> #include <File.au3> #include <FileConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ListBackupFolders() ; ----------------------------------------------- Func ListBackupFolders() Local $sBackupFolderPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------- Local $ArrayFolders = _FileListToArrayRec($sBackupFolderPath, "*", $FLTAR_FOLDERS) ; ----------------- Local $verify = MsgBox(68, "Notice!", "List the backup folders?!") ; ----------------------------------------------- While True Select Case $verify = 6 _ArrayDisplay($ArrayFolders, "Folder Listing", Default, 64) Case $verify = 7 MsgBox($MB_ICONINFORMATION, "Notice!", "The operation was cancelled. Exiting!", 1) EndSelect Return WEnd ; ----------------------------------------------- EnterSetName() EndFunc ;==>ListBackupFolders ; ----------------------------------------------- Func EnterSetName() Local $sPrompt = "Create A New Backup Folder!" Local $sMessage = "Enter The Backup folder name..." Local $sSelectedSessionPath = InputBox($sPrompt, $sMessage, "", " M", 275, 130) ; ----------------- Local $SplitPath = StringSplit($sSelectedSessionPath, "\") ; ----------------------------------------------- If $SplitPath[0] <= 5 Or $SplitPath[0] >= 7 Then MsgBox($MB_TOPMOST, "Error!", "The Entered Path Name Is Incorrect! Please Try Again...") EnterSetName() Else CreateFolder($sSelectedSessionPath) EndIf EndFunc ;==>EnterSetName ; ----------------------------------------------- Func CreateFolder($sSelectedSessionPath) Local $sSrcWavDataPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------------------------------------- DirCreate($sSelectedSessionPath) ; ----------------------------------------------- Local $sBackupPath = $sSelectedSessionPath BackupSoundData($sBackupPath) EndFunc ;==>CreateFolder ; ----------------------------------------------- Func BackupSoundData($sBackupPath) Local $iStart = 2, $iEnd = 1 Local $sSrcPath[$iStart] = [$iEnd] $sSrcPath[1] = "E:\Text\Native Instruments\Guitar Rig 5\Sounds\*.ngrr" ; ----------------- Local $sDstPath[$iStart] = [$iEnd] $sDstPath[1] = $sBackupPath ; ----------------- Local $sMessage = "Backup All Sound File data..." & @CRLF & @CRLF, $iWidth = 450, $iHeight = 135 Local $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = FileCopy($sSrcPath[$i], $sDstPath[$i], $FC_OVERWRITE) ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Sound file data DOES NOT exist!" Case 1 $sResult = "The Sound file data WAS backed-up successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Backup All Sound File data is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() EndFunc ;==>BackupSoundData ; ----------------------------------------------- As always...any assistance in this matter would be greatly appreciated!
  4. Good day one-and-all! I really, really, really...could use some assistance here is getting a start on the above... 1) I need to read a directory of existing folders 2) I then need to list those read folders 3) I then need to be able to select a single folder from that listing 4) After I have selected that folder, I then need to perform an "action" on that previously selected folder,[copy data to, create, and|or delete] Any assistance in this "project" would be greatly, greatly, greatly appreciated! Note: See here for a sampling...
  5. Good day, Maybe...just maybe, I should have included more of the script? Here is a condensed sampling: ; ----------------------------------------------- #include <File.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- Main() ; ----------------------------------------------- Func Main() GUICreate("Test Menu", 150, 20, 1410, 22) ; ----------------------------------------------- Global $mBackup = GUICtrlCreateMenu("Backup Menu") Global $mBackupSrcData = GUICtrlCreateMenuItem("Backup", $mBackup) ; ----------------- Global $mExitMenu = GUICtrlCreateMenu("Exit Menu") Global $mExitMe = GUICtrlCreateMenuItem("Exit", $mExitMenu) ; ----------------------------------------------- GUISetState(@SW_SHOW) ; ----------------------------------------------- While 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ; ----------------- ; Backup Menu Case $mBackupSrcData ListBackupFolders() ; ----------------- ; Exit Menu Case $mExitMe ExitMe() EndSwitch WEnd EndFunc ;==>Main ; ----------------------------------------------- ; ----------------------------------------------- ; Backup Menu Functions Func ListBackupFolders() Local $sBackupFolderPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------- Local $ArrayFolders = _FileListToArrayRec($sBackupFolderPath, "*", $FLTAR_FOLDERS) ; ----------------- Local $verify = MsgBox(68, "Notice!", "List the backup folders?!") ; ----------------------------------------------- Select Case $verify = 6 _ArrayDisplay($ArrayFolders, "Folder Listing", Default, 64) Case $verify = 7 MsgBox($MB_ICONINFORMATION, "Notice!", "The operation was cancelled. Exiting!", 1) Exit ; Line 52 EndSelect ; ----------------------------------------------- EnterSoundFolderName() EndFunc ;==>ListBackupFolders ; ----------------------------------------------- Func EnterSoundFolderName() Local $sRootPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets\" Local $sSoundsFolderName = "" ; ----------------------------------------------- While $sSoundsFolderName = "" $sSoundsFolderName = InputBox("NOTICE!", "Enter the Sounds Folder Name...", "", "", 150, 130) ; ----------------- If @error Then MsgBox($MB_ICONWARNING, "Notice!", "The operation was cancelled. Exiting!") ;~ Exit Else Local $sBackupPath = DirCreate($sRootPath & $sSoundsFolderName) $sBackupPath = $sRootPath & $sSoundsFolderName DoesBackupFolderExist($sBackupPath) EndIf WEnd EndFunc ;==>EnterSoundFolderName ; ----------------------------------------------- Func DoesBackupFolderExist($sBackupPath) Local $sDoesFolderExist = FileExists($sBackupPath) ; ----------------------------------------------- If $sDoesFolderExist Then BackupSoundData($sBackupPath) Else CreateBackupFolder($sBackupPath) EndIf EndFunc ;==>DoesBackupFolderExist ; ----------------------------------------------- Func CreateBackupFolder($sBackupPath) Local $iStart = 2, $iEnd = 1 Local $sSrcPath[$iStart] = [$iEnd] $sSrcPath[1] = $sBackupPath ; ----------------- Local $sMessage = "Create Backup Folder..." & @CRLF & @CRLF, $iWidth = 450, $iHeight = 135 Local $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = DirCreate($sSrcPath[$i]) $sBackupPath = $sSrcPath[$i] ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Backup Folder DOES NOT exist!" Case 1 $sResult = "The Backup Folder WAS created successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Creating Backup Folder is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() ; ----------------------------------------------- BackupSoundData($sBackupPath) EndFunc ;==>CreateBackupFolder ; ----------------------------------------------- Func BackupSoundData($sBackupPath) Local $iStart = 2, $iEnd = 1 Local $sSrcPath[$iStart] = [$iEnd] $sSrcPath[1] = "E:\Text\Native Instruments\Guitar Rig 5\Sounds\*.ngrr" ; ----------------- Local $sDstPath[$iStart] = [$iEnd] $sDstPath[1] = $sBackupPath ; ----------------- Local $sMessage = "Backup All Sound File data..." & @CRLF & @CRLF, $iWidth = 450, $iHeight = 135 Local $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = FileCopy($sSrcPath[$i], $sDstPath[$i], $FC_OVERWRITE) ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Sound file data DOES NOT exist!" Case 1 $sResult = "The Sound file data WAS backed-up successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Backup All Sound File data is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() EndFunc ;==>BackupSoundData ; ----------------------------------------------- ; ----------------------------------------------- ; Exit Menu Functions Func ExitMe() Exit EndFunc ;==>ExitMe ; ----------------------------------------------- The line in question is Line 52.
  6. pixelsearch, ; ----------------------------------------------- ListBackupFolders1() ; ----------------------------------------------- Func ListBackupFolders1() Local $sBackupFolderPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------- Local $ArrayFolders = _FileListToArrayRec($sBackupFolderPath, "*", $FLTAR_FOLDERS) ; ----------------- Local $verify = MsgBox(68, "Notice!", "List the backup folders?!") ; ----------------------------------------------- Select Case $verify = 6 _ArrayDisplay($ArrayFolders, "Folder Listing", Default, 64) Case $verify = 7 MsgBox($MB_ICONINFORMATION, "Notice!", "The operation was cancelled. Exiting!", 1) Exit ; Line 16 EndSelect ; ----------------------------------------------- EnterSoundFolderName() EndFunc ;==>ListBackupFolders1 ; ----------------------------------------------- Line 16...
  7. argumentum, Tried that...no success! ; ----------------------------------------------- #include <array.au3> #include <AutoItConstants.au3> #include <file.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ListBackupFolders1() ; ----------------------------------------------- Func ListBackupFolders1() Local $sBackupFolderPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------- Local $ArrayFolders = _FileListToArrayRec($sBackupFolderPath, "*", $FLTAR_FOLDERS) ; ----------------- Local $verify = MsgBox(68, "Notice!", "List the backup folders?!") ; ----------------------------------------------- Select Case $verify = 6 _ArrayDisplay($ArrayFolders, "Folder Listing", Default, 64) Case $verify = 7 MsgBox($MB_ICONINFORMATION, "Notice!", "The operation was cancelled. Exiting!", 1) ;~ Exit Return EndSelect ; ----------------------------------------------- EnterSoundFolderName1() EndFunc ;==>ListBackupFolders1 ; -----------------------------------------------
  8. Good day, I have the following script: ; ----------------------------------------------- #include <array.au3> #include <AutoItConstants.au3> #inaclude <file.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ListBackupFolders1() ; ----------------------------------------------- Func ListBackupFolders1() Local $sBackupFolderPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets" ; ----------------- Local $ArrayFolders = _FileListToArrayRec($sBackupFolderPath, "*", $FLTAR_FOLDERS) ; ----------------- Local $verify = MsgBox(68, "Notice!", "List the backup folders?!") ; ----------------------------------------------- Select Case $verify = 6 _ArrayDisplay($ArrayFolders, "Folder Listing", Default, 64) Case $verify = 7 MsgBox($MB_ICONINFORMATION, "Notice!", "The operation was cancelled. Exiting!", 1) Exit EndSelect ; ----------------------------------------------- EnterSoundFolderName1() EndFunc ;==>ListBackupFolders1 ; ----------------------------------------------- Func EnterSoundFolderName1() Local $sRootPath = "E:\Text\Native Instruments\Guitar Rig 5\Presets\" Local $sSoundsFolderName = "" ; ----------------------------------------------- While $sSoundsFolderName = "" $sSoundsFolderName = InputBox("NOTICE!", "Enter the Sounds Folder Name...", "", "", 150, 130) ; ----------------- If @error Then MsgBox($MB_ICONWARNING, "Notice!", "The operation was cancelled. Exiting!") Exit Else Local $sBackupPath = DirCreate($sRootPath & $sSoundsFolderName) $sBackupPath = $sRootPath & $sSoundsFolderName DoesFolderExist($sBackupPath) EndIf WEnd EndFunc ;==>EnterSoundFolderName1 ; ----------------------------------------------- Func DoesFolderExist($sBackupPath) Local $sDoesFolderExist = FileExists($sBackupPath) ; ----------------------------------------------- If $sDoesFolderExist Then BackupSoundData($sBackupPath) Else CreateBackupFolder($sBackupPath) EndIf EndFunc ;==>DoesFolderExist ; ----------------------------------------------- Func CreateBackupFolder($sBackupPath) Local $iStart = 2, $iEnd = 1 Local $sSrcPath[$iStart] = [$iEnd] $sSrcPath[1] = $sBackupPath ; ----------------- Local $sMessage = "Create Backup Folder..." & @CRLF & @CRLF, $iWidth = 450, $iHeight = 135 Local $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = DirCreate($sSrcPath[$i]) $sBackupPath = $sSrcPath[$i] ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Backup Folder DOES NOT exist!" Case 1 $sResult = "The Backup Folder WAS created successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Creating Backup Folder is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() ; ----------------------------------------------- BackupSoundData($sBackupPath) EndFunc ;==>CreateBackupFolder ; ----------------------------------------------- Func BackupSoundData($sBackupPath) Local $iStart = 2, $iEnd = 1 Local $sSrcPath[$iStart] = [$iEnd] $sSrcPath[1] = "E:\Text\Native Instruments\Guitar Rig 5\Sounds\*.ngrr" ; ----------------- Local $sDstPath[$iStart] = [$iEnd] $sDstPath[1] = $sBackupPath ; ----------------- Local $sMessage = "Backup All Sound File data..." & @CRLF & @CRLF, $iWidth = 450, $iHeight = 135 Local $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = FileCopy($sSrcPath[$i], $sDstPath[$i], $FC_OVERWRITE) ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Sound file data DOES NOT exist!" Case 1 $sResult = "The Sound file data WAS backed-up successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Backup All Sound File data is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() EndFunc ;==>BackupSoundData ; ----------------------------------------------- In ListBackupFolders1(), when cancelling the listing,, upon selecting "Exit" the entire script is terminated! Is there any way to exit a function and not the entire script? As always...any assistance in this matter would be greatly appreciated!
  9. Good day, Well...this works... ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- UpdateDtIP() ; ----------------------------------------------- Func UpdateDtIP() ExitFolder() LaunchFolder() LaunchTxt() EndFunc ;==>UpdateDtIP ; ----------------------------------------------- Func ExitFolder() Local $sFilePath = "D:\" Local $iFileExists = FileExists($sFilePath) ; ----------------------------------------------- If $iFileExists Then WinClose("[CLASS:CabinetWClass]", "") EndIf EndFunc ;==>ExitFolder ; ----------------------------------------------- Func LaunchFolder() Local $sSrcPath = "D:\Initial_Prep" ; ----------------------------------------------- ShellExecute($sSrcPath) Sleep(150) ;~ WinMove($sSrcPath, "", 406, 100, 550, 650) WinMove("[CLASS:CabinetWClass]", "", 406, 100, 550, 650) EndFunc ;==>LaunchFolder ; ----------------------------------------------- Func LaunchTxt() Local $sSrcPath = "D:\Initial_Prep\Procedure_Initial_Prep.txt" ; ----------------------------------------------- ShellExecute($sSrcPath) Sleep(150) WinMove($sSrcPath, "", 964, 100, 550, 650) EndFunc ;==>LaunchTxt ; -----------------------------------------------
  10. Good day, Hmmmm...this "worked"... #include <MsgBoxConstants.au3> Example() Func Example() Local $sFilePath = "D:\" Local $iFileExists = FileExists($sFilePath) If WinClose("[CLASS:CabinetWClass]", "") Then MsgBox($MB_SYSTEMMODAL, "", "Window closed") Else MsgBox($MB_SYSTEMMODAL + $MB_ICONERROR, "Error", "Window not Found") EndIf EndFunc ;==>Example
  11. pixelsearch, Sorry, none of those various options "worked"!
  12. Good day, I need to exit a "drives"...for example, "D:" For example...this only works when "Display the full path..." [Folder Options, View] is enabled! • With that option disabled, the script no longer executes. ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ExitFolder() ; ----------------------------------------------- Func ExitFolder() Local $sSrcPath = "D:\" Local $iFileExists = FileExists($sSrcPath) ; ----------------------------------------------- If $iFileExists Then WinClose($sSrcPath) EndIf EndFunc ;==>ExitFolder ; ----------------------------------------------- The label for the drive is: "Utilities". I have attempted numerous examples form the forum...with no success!! "Help!!!"
  13. argumentum, Simply "...'cause...I wanna...!"
  14. Good day, I hope that the day finds you well! Does anyone know of a 'ways-and-means" of being able to remove the "Immersive Control Panel.Lnk"? Any methods I have tried have all failed. I am able to manually delete the link however. PS: I do NOT want to remove the executable...I just want to remove the link...even though Windows appears to refer to this link as a "system file"? As always...any assistance in this matter would be greatly appreciated!
  15. argumentum, Thanks for the clarification...Yes, indeed! Your comment..."Not an issue, a feature...." is very apropos here! Thansk!
  16. Good day, I hope that the day finds you all very well! I have been experiencing major issues with regards to executing .ps1 script within AutoIt in Windows 10 LTSC!! I finally discover that "tucked away in the background" , was an error message stating, "...running scripts is disabled on this system...". This was discovered after some 1-2 hours of wondering why my script was NOT executing as expected! • See this: [Click_Me] ...and this... [Click_Me] Here is the original script... ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ExcludeMe() ; ----------------------------------------------- Func ExcludeMe() Local $sPS1Script = "D:\Install\OS\Scripts\ExcludeMe.ps1" ; ----------------------------------------------- Run('powershell.exe -File ' & '"' & $sPS1Script & '"', "", @SW_HIDE) EndFunc ;==>ExcludeMe ; ----------------------------------------------- ...and here is the updated script... ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ExcludeMe() ; ----------------------------------------------- Func ExcludeMe() Local $sPS1Script = "D:\Install\OS\Scripts\ExcludeMe.ps1" ; ----------------------------------------------- Run('powershell.exe -ExecutionPolicy Bypass -File ' & '"' & $sPS1Script & '"', "", @SW_HIDE) EndFunc ;==>ExcludeMe ; ----------------------------------------------- All that was required was the addition of the parameter, "-ExecutionPolicy Bypass"!! "WOW!!!" I must admit that I was rather surprised...that it would appear...that no one else was experiencing this issue!! I hope this information will be of some practicable employment?
  17. ioa747, Yeppers!...Ya' got it! What I do NOT understand, is that I always enable that feature...and thus, I have NO IDEA how that option got changed on UserA?!? • I mean, I actually wrote a script that enables that feature at the very beginning of my Windows installations. Here is that script [UpdateRegistry]: ; ----------------------------------------------- #RequireAdmin ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- UpdateRegKey() ; ----------------------------------------------- Func UpdateRegKey() Local $sSrcPath = RunWait('REGEDIT /S "D:\Assets\RegKeys\UpdateExplorer.reg"') ; ----------------- Local $sMessage = "Update Registry Key..." & @CRLF & @CRLF Local $iWidth = 450, $iHeight = 245, $iOpt = 5, $sFontName = "FuturaBQ-DemiBold", $iFontSize = 14 ; ----------------------------------------------- SplashTextOn("", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) ; ----------------------------------------------- For $i = 1 To $sSrcPath[0] Local $sResult = $sSrcPath[$i] ; ----------------------------------------------- Switch $sResult Case 0 $sResult = "The Registry WAS updated successfully!" Case 1 $sResult = "The Registry WAS NOT updated successfully!" EndSwitch ; ----------------------------------------------- $sMessage &= $sResult & @CRLF Next ; ----------------------------------------------- $sMessage &= @CRLF & "Update Registry Keys is now completed..." & @CRLF ; ----------------------------------------------- SplashTextOn("NOTICE!!", $sMessage, $iWidth, $iHeight, -1, -1, $iOpt, $sFontName, $iFontSize) Sleep(2000) SplashOff() EndFunc ;==>UpdateRegKey ; ----------------------------------------------- Here is the RegKey [UpdateExplorer.reg]: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced] ; Display the full path in the title bar: [CabinetState] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState] ; Display the full path in the title bar...; 1=Enabled, 0=Disabled, Status: Enabled "FullPath"=dword:00000001 Thanks again, 101747! You are very much "underdemciated!"....I mean "appreciated!"
  18. Good day, I hope that the day finds you well! I am having an issue with User Profiles on the same system...say UserA and UserB. I created a script under UserB...which functions as it should when logged in as UserB. However, if I attempt to run the very same script as UserA, the script no longer functions! Any ideas! This IS just a bit frustrating! Thank you for your time...appreciated! PS: Here is the script...which is launched from Drive D... ; ----------------------------------------------- #RequireAdmin ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- ExitFolder() LaunchFolder() LaunchTxt() ; ----------------------------------------------- Func ExitFolder() Local $sSrcPath = "D:\" Local $iFileExists = FileExists($sSrcPath) ; ----------------------------------------------- If $iFileExists Then WinClose($sSrcPath) EndIf EndFunc ;==>ExitFolder ; ----------------------------------------------- Func LaunchFolder() Local $sSrcPath = "D:\Initial_Prep" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 406, 100, 550, 650) EndFunc ;==>LaunchFolder ; ----------------------------------------------- Func LaunchTxt() Local $sSrcPath = "D:\Initial_Prep\Procedure_Initial_Prep.txt" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWaitActive($sSrcPath, "") WinMove($sSrcPath, "", 964, 100, 550, 650) EndFunc ;==>LaunchTxt ; -----------------------------------------------
  19. argumentum, "Yes it is. Why are you asking ?" Just wanted to ensure that I was on the "right tracks"!!! Thanks again!!
  20. Good day, I hope that the day finds each of you very well! I need to ensure that the GUI is properly exited! Here is my current script: ; ----------------------------------------------- #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- Global $ExitSACGui ; ----------------------------------------------- LiveGui() ; ----------------------------------------------- Func LiveGui() $ExitSACGui = GUICreate("", 75, 23, 630, 50, $WS_POPUP, $WS_EX_TOPMOST) GUISetFont(14, 800, 0, "Calibri") GUISetBkColor(0x3D3D3D) ; ----------------------------------------------- Local $sColRow = GUICtrlCreateLabel(" Exit SAC", 0, 0, 75, 23, $SS_CENTER) GUICtrlSetColor(-1, 0xFFFFFF) ; ----------------------------------------------- GUISetState(@SW_SHOW) ; ----------------------------------------------- While 1 Switch GUIGetMsg() Case $sColRow ExitSACTTA() GUIDelete($ExitSACGui) Exit EndSwitch WEnd EndFunc ;==>LiveGui ; ----------------------------------------------- Func ExitSACTTA() ExitSAC() LaunchTTA() EndFunc ;==>ExitSACTTA ; ----------------------------------------------- Func ExitSAC() Local $sSrcPath1a = "C:\RML\SAC\SAC64.exe" Local $sSrcPath1b = "SAC64.exe" Local $PID = 0 ; ----------------------------------------------- ProcessClose($sSrcPath1a) $PID = ProcessExists($sSrcPath1b) If $PID Then ProcessClose($PID) EndFunc ;==>ExitSAC ; ----------------------------------------------- Func LaunchTTA() Local $sSrcPath = "C:\Windows\toggleTaskbarAutohide.exe" ; ----------------------------------------------- Run($sSrcPath) Sleep(100) EndFunc ;==>LaunchTTA ; ----------------------------------------------- As always...any assistance in this matter would be greatly appreciated! Thank you!
  21. Anyone care to comment on the above two examples?
  22. Moi, WOW! Very nice indeed!! Thank you so very, very much!!
  23. Hello, A second offering... ; ----------------------------------------------- #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- IfBackupFolderExists() ; ----------------------------------------------- Func IfBackupFolderExists() Local $sFolder = "F:\Audio\Type_1\SessionTest" ; ----------------- Local $iFileExists = FileExists($sFolder) ; ----------------- If $iFileExists Then Local $sMsg = MsgBox(20, "Caution!", "The Destination Folder DOES Exist! Continue?") ; ----------------------------------------------- If $sMsg == 6 Then MsgBox($MB_ICONWARNING, "Notice!", "The Existing Data Will 1) Be Deleted..." & @CRLF & @CRLF & "...And 2) The Source Data Will Then Be Backed-up...", 2) BackupFolderData() ElseIf $sMsg == 7 Then MsgBox($MB_ICONINFORMATION, "Notice!", "Exiting...The Existing Data Will Not Be Backed-up...", 2) Exit EndIf EndIf EndFunc ;==>IfBackupFolderExists ; ----------------------------------------------- Func BackupFolderData() MsgBox($MB_ICONWARNING, "Notice!", "Backing-up The Existing Data...", 3) EndFunc ;==>BackupFolderData ; -----------------------------------------------
  24. Good day, As stated in the HelpFile, "2) If the destination already exists and the overwrite flag is specified then the source directory will be moved inside the destination." I must admit, I was initially having issues with this command! Now that I do believe that I have a better understanding of this command, I am wondering if the following script would be "acceptable"? • I am assuming that if the DirMove() command is to be invoked, that the current backup must first be deleted? Correct? ; ----------------------------------------------- #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- BackupSetData() ; ----------------------------------------------- Func BackupSetData() IfFolderExists() ;~ BackupFolderData() EndFunc ;==>BackupSetData ; ----------------------------------------------- Func IfFolderExists() Local $sFolder = "F:\Audio\Type_1\SessionTest" ; ----------------- Local $iFileExists = FileExists($sFolder) ; ----------------- If $iFileExists Then Local $sMsg = MsgBox(20, "Caution!", "The Destination Folder DOES Exist! Continue?") ; ----------------------------------------------- If $sMsg == 6 Then MsgBox($MB_ICONWARNING, "Notice!", "The Existing Data Will First Be Deleted...", 2) MsgBox($MB_ICONWARNING, "Backing Up Data...", "The Existing Data Will Now Be Backed-up...", 2) ;~ BackupFolderData() ElseIf $sMsg == 7 Then MsgBox($MB_ICONINFORMATION, "Exiting...", "The Existing Data Will Not Be Backed-up...", 2) Exit EndIf EndIf EndFunc ;==>IfFolderExists ; ----------------------------------------------- Func BackupFolderData() ;~ Dummy EndFunc ;==>BackupFolderData ; ----------------------------------------------- As always...any assistance in this matter would be greatly appreciated! Thank you!
×
×
  • Create New...