Jump to content

Change path


Masen
 Share

Recommended Posts

ok im trying to write a script to change a path from default path to what the user would wanna change it to.

so this is the default path :  |||   "C:\Users\masen\Desktop\Database"  |||

and if they go into the admin page on the program. and decide to change the path there to let says

 "C:\Users\masen\Desktop\HOME"

considering the User does not know how to write script.

so this would be more of an option for the user on the admin page.

were would i begin to get this script going.

thx in advance

Func Folders()
     $message = ("Click Shift to Select Multiple files.")
    $var = FileOpenDialog($message, "C:\Users\masen\Desktop\Database" & "\", "Pictures (*.jpg; *.bmp; *.png; *.gif)|Videos (*.avi; *.mpg)|Txt (*.txt)", $FD_FILEMUSTEXIST + $FD_MULTISELECT)
    $file = FileRead($var)
    If @error Then
        Else
    endif

        MsgBox(0, "", "No File(s) were selected")
EndFunc   ;==>Example

 

Edited by Melba23
Altered title
Link to comment
Share on other sites

  • Moderators

Masen,

I notice all your threads are entitled "Need help" or something pretty close. Everyone who posts here needs help - it goes without saying - so could you please give more descriptive titles to your threads in future. Thanks for your cooperation in this.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

If i got the problem right.. You can set a variable to default path in fileopendialog.

Set the variable with fileselectfolder for example

Local $sFileSelectFolder = FileSelectFolder('Title', "")
$var = FileOpenDialog('Title', $sFileSelectFolder & "\", "Txt (*.txt)")

 

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

If you use the $FD_MULTISELECT flag with FileOpenDialog, you have to split the returned string (using | as delimiter). See the helpfile, in the Return section :

https://www.autoitscript.com/autoit3/docs/functions/FileOpenDialog.htm

 

Edited by jguinch
Link to comment
Share on other sites

3 hours ago, careca said:

If i got the problem right.. You can set a variable to default path in fileopendialog.

Set the variable with fileselectfolder for example

Local $sFileSelectFolder = FileSelectFolder('Title', "")
$var = FileOpenDialog('Title', $sFileSelectFolder & "\", "Txt (*.txt)")

yea that works great now i just got to get that specific folder to save it to make sure i remembers that path that the users chooses

Link to comment
Share on other sites

Save to ini for example.

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