Sign in to follow this  
Followers 0
CyberFunk Productions

Ini

9 posts in this topic

#1 ·  Posted (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 by CyberFunk Productions

Share this post


Link to post
Share on other sites



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)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

thanx that worked, but i still need help on this issue

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

Share this post


Link to post
Share on other sites

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

ELL, not eye. lnk is short for Link.

Share this post


Link to post
Share on other sites

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

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

wow, i figured it out, thanx for the help.

Share this post


Link to post
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
Sign in to follow this  
Followers 0