xtreempje Posted March 18 Share Posted March 18 So Im trying to start shortcuts with proxy and want to save the file output as a variable like $client1 = "C:/shortcut.lnk" what I tried is saving it with iniwrite but then I get a  in the file wich makes the script return to an error. I also tried : Func Save() If _GUICtrlEdit_GetLine($Edit1, 0) = True Then $FileName = GUICtrlRead($Input1) ;$FileName = @Systemdir & "\mstsc.exe" ; to work with autoit variables $args = '_GUICtrlEdit_GetLine($Edit1, 0) $LinkFileName = GUICtrlRead($Input2) & "\Client1.lnk" $WorkingDirectory = "%windir%" ;$WorkingDirectory = @WindowsDir $Icon = GUICtrlRead($Input1) ;$Icon = @WindowsDir & \system32\SHELL32.dll" $IconNumber = 67 $Description = "Concept Icon" $State = @SW_SHOWMAXIMIZED FileCreateShortcut($FileName, $LinkFileName, $WorkingDirectory, $args, $Description, $Icon,"", $IconNumber, $State) _FileWriteToLine( "Config.au3", 3, "$client1=" & GUICtrlRead($Input2), & '\Client1.lnk"' 1) Endif EndFunc But if the .au3 file is empty it will not write in it. I also tried Filewrite but then It does not replace anything and just add multiple lines with the same variable. I hope someone can help me out, thanks. Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now