CyberFunk Productions 0 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 Share this post Link to post Share on other sites
Jos 2,214 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. Share this post Link to post Share on other sites
CyberFunk Productions 0 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 Share this post Link to post Share on other sites
CyberSlug 6 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! Share this post Link to post Share on other sites
CyberFunk Productions 0 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" Share this post Link to post Share on other sites
Valik 478 Posted April 17, 2004 ELL, not eye. lnk is short for Link. Share this post Link to post Share on other sites
CyberFunk Productions 0 Posted April 17, 2004 ok, it stand for link, but i still don't know what to put there, a path to where? Share this post Link to post Share on other sites
Valik 478 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. Share this post Link to post Share on other sites
CyberFunk Productions 0 Posted April 18, 2004 wow, i figured it out, thanx for the help. Share this post Link to post Share on other sites