gte Posted November 6, 2009 Posted November 6, 2009 This is probably a dumb question and I must be searching on the wrong words for this, cause I know others have needed this I want to open two folders after creating them in a gui I can't find any functions like diropen or folderopen? I tried this code, and even this is failing? Any thoughts $todaysdate = "" & @mon & "-" & @mday & "-" & @YEAR DirCreate("d:\hold\" & $todaysdate & " - Backup") Run(""," start d:\hold\" & $todaysdate & " - Backup") HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
memoryoverflow Posted November 6, 2009 Posted November 6, 2009 What do you mean with 'open'? Display the contents à la dir command? (The signature is placed on the back of this page to not disturb the flow of the thread.)
Yashied Posted November 6, 2009 Posted November 6, 2009 ShellExecute("d:\hold\" & $todaysdate & " - Backup") My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
gte Posted November 6, 2009 Author Posted November 6, 2009 Just like if you are going to open a folder by double clicking on it@Yashield, I'll give that a shot, thanks!What do you mean with 'open'? Display the contents à la dir command? HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
PsaltyDS Posted November 6, 2009 Posted November 6, 2009 How about this? $todaysdate = "" & @mon & "-" & @mday & "-" & @YEAR $sDir = "d:\hold\" & $todaysdate & " - Backup" DirCreate($sDir) Run("Explorer.exe /root," & $sDir) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
microera Posted November 6, 2009 Posted November 6, 2009 maybe this: Initiates a Open File Dialog. FileOpenDialog ( "title", "init dir", "filter" [, options [, "default name" [, hwnd]]] ) Parameters title Title text of the Dialog GUI. init dir Initial directory selected in the GUI file tree. filter File type single filter such as "All (*.*)" or "Text files (*.txt)" or multiple filter groups such as "All (*.*)|Text files (*.txt)" (See Remarks). options [optional] Dialog Options: To use more than one option, add the required values together. 1 = File Must Exist (if user types a filename) 2 = Path Must Exist (if user types a path, ending with a backslash) 4 = Allow MultiSelect 8 = Prompt to Create New File (if does not exist) default name [optional] Suggested file name for the user to open. Default is blank (""). hwnd [optional] The window handle to use as the parent for this dialog. Return Value Success: Returns the full path of the file(s) chosen. Results for multiple selections are "Directory|file1|file2|..." Failure: Sets @error to 1. Remarks Separate the file filters with a semicolon as shown in the example. Multiple groups of filters are separated by a pipe "|". If default name is given, options must also be given. If none of the options are wanted, use 0 for options. Special Windows folders (such as "My Documents") can sometimes be set as the init dir; see Appendix. @WorkingDir is changed on successful return. Related FileSaveDialog, FileSelectFolder, StringSplit Example $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @WindowsDir & "\", "Images (*.jpg;*.bmp)", 1 + 4 ) If @error Then MsgBox(4096,"","No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) MsgBox(4096,"","You chose " & $var) EndIf ; Multiple filter group $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @WindowsDir & "", "Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)", 1 + 4 ) If @error Then MsgBox(4096,"","No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) MsgBox(4096,"","You chose " & $var) EndIf
gte Posted November 6, 2009 Author Posted November 6, 2009 Thanks Psalty, I think that would have worked as well How about this? $todaysdate = "" & @mon & "-" & @mday & "-" & @YEAR $sDir = "d:\hold\" & $todaysdate & " - Backup" DirCreate($sDir) Run("Explorer.exe /root," & $sDir) HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now