Sign in to follow this  
Followers 0
CyberFunk Productions


3 posts in this topic

Heres the program i made(well some of it)

Global $Key

;shorcut keys
HotKeySet("{F5}", "F5")

Func ShortC() ;Writes keys
   $Exist = FileExists ("Keys")

   If $Exist = 0 Then   ;checks to see is file exists   
      DirCreate("Keys") ;if not creates it

   $Path = Inputbox( "File Path", "Please enter path of file" , "Path" , "" , -1, 75, -1,-1 )   ;gets values
   $File = Inputbox( "File", "Please enter filename(including path!)" , "File" , "" , -1, 75, -1,-1 )
   IniWrite( ?, $Key, "F6P", $Path);then write the values
   IniWrite( ?, $Key, "F6F", $File)

;Shortcut functions  
Func F5()
   $search = FileFindFirstFile("F5.ini")     ;Searches for file
   IF $search = -1 Then        ;if nothing found ask if want to config
      $Answer = MsgBox(4, "Not configured!", "Would you like to configure this key?")   
      If $Answer = 6 Then    
         $Key = "F5.ini"
         Call ( "ShortC" ) 
      $File = IniRead ( "F5.ini", "F5.ini", "F6F", "default" )  

      $Path = IniRead ( "F5.ini", "F5.ini", "F6P", "default" )
      Run($File, $Path, @SW_MAXIMIZE)

now right where the ? are in the ini write statements, i want to be able to put a path to the Keys folder so the value in the $Key var is written into the keys folder

The file name saved in $Key i want to be the name of the file written into the keys folder

i hope you can understand what i'm doing, i have multiple shortcut functions, so thats why the file name needs to be in a var

Share this post

Link to post
Share on other sites

IniWrite( ".\Keys\" & $Key)

Maybe. I'm still not clear what you want the name and full path of the ini file to be....

The ".\" might not even be necessary since paths are assumed to be relative to the current working directory. Look at the FileChangeDir function.

Just in case you didn't know this:

A dot typically represents the current folder, and two dots represent the parent folder. Thus, the following checks for the existance of C:\boot.ini

FileChangeDir("C:\Windows" )

FileExists("..\boot.ini" )

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

well that worked, thanx alot!!!!!!

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