CyberFunk Productions Posted April 17, 2004 Share Posted April 17, 2004 (edited) I have this chunk of code.... Func ShortC() ;Writes keys $Exist = FileExists ("Keys") If $Exist = 0 Then ;checks to see is file exists DirCreate("Keys") ;if not creates it EndIf $Path = FileSelectFolder("Choose a file.", "", 0) ;gets values $File = FileOpenDialog("File EXE", "C:\Program Files\", "Files (*.exe)", 1) Sleep(500) IniWrite( ".\Keys\" & $Key, $Key, "F6P", $Path) ;then write the values IniWrite( ".\Keys\" & $Key, $Key, "F6F", $File) EndFunc The problem i'm having is that it won't write the ini file, if i use regular input boxes for the path and file it will write it but if i use the FileSelcetFolder and FileOpenDialog it won't write non-related question: also, i want to take a file from a folder and make a shortcut of it to put on the desktop. I found the FileCreatShortcut command but i don't understand how to use it Edited April 17, 2004 by CyberFunk Productions Link to comment Share on other sites More sharing options...
Developers Jos Posted April 17, 2004 Developers Share Posted April 17, 2004 The issue is that the FileSelectFolder/FileOpenDialog are changing the default directory ( i think) This works fine: IniWrite( @scriptdir & "\Keys\" & $Key, $Key, "F6P", $Path) ;then write the values IniWrite( @scriptdir & "\Keys\" & $Key, $Key, "F6F", $File) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
CyberFunk Productions Posted April 17, 2004 Author Share Posted April 17, 2004 thanx that worked, but i still need help on this issuealso, i want to take a file from a folder and make a shortcut of it to put on the desktop. I found the FileCreatShortcut command but i don't understand how to use it Link to comment Share on other sites More sharing options...
CyberSlug Posted April 17, 2004 Share Posted April 17, 2004 thanx that worked, but i still need help on this issueIn its simplest form:FileCreateShortcut("C:\a file from a folder.exe", @DesktopDir & "\Shortcut to whatever.lnk") Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberFunk Productions Posted April 17, 2004 Author Share Posted April 17, 2004 ok, i have this FileCreateShortcut("C:\Program Files\ShortCut\Short Cut.au3", @DesktopDir & "\Shortcut to whatever.lnk") i still don't understand what to put in the "\Shortcut to whatever.ink" Link to comment Share on other sites More sharing options...
Valik Posted April 17, 2004 Share Posted April 17, 2004 ELL, not eye. lnk is short for Link. Link to comment Share on other sites More sharing options...
CyberFunk Productions Posted April 17, 2004 Author Share Posted April 17, 2004 ok, it stand for link, but i still don't know what to put there, a path to where? Link to comment Share on other sites More sharing options...
Valik Posted April 18, 2004 Share Posted April 18, 2004 Where you want the shortcut to be created at, like the help file says. The shortcut has to exist somewhere on the system, too. Link to comment Share on other sites More sharing options...
CyberFunk Productions Posted April 18, 2004 Author Share Posted April 18, 2004 wow, i figured it out, thanx for the help. Link to comment Share on other sites More sharing options...
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