Jump to content

robertcollier4

Active Members
  • Posts

    55
  • Joined

  • Last visited

Recent Profile Visitors

503 profile views

robertcollier4's Achievements

  1. Choose a directory of link files to replace substring paths. Also gives you a full display (text) of your LNK files. #include <Array.au3> #include <_RecFileListToArray.au3> #include <File.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #Include <GUIEdit.au3> Local $dirToSearchDefault = @ProgramsCommonDir ; Local $dirToSearchDefault = "D:\testdir" Local $dirToSearch = InputBox("Select directory", "In which directory are your LNK files?", $dirToSearchDefault, "", 520, 320) If $dirToSearch = "" Then Exit EndIf Local $listFiles = _RecFileListToArray($dirToSearchDefault, "*", 1, 1, 0, 2) If (Not IsArray($listFiles)) and (@Error=1) Then MsgBox (0,"","No files found in search path, exiting") Exit EndIf ;--------------------------------------------------------------- ;Displaying list of Link LNK in GUI Editbox Local $ThisTodisplayList = "LNK Files Found In: " & $dirToSearch & @CRLF & @CRLF $ThisTodisplayList &= "========================" & @CRLF Local $ThisTodisplayDrive = "", $ThisTodisplayDir = "", $ThisTodisplayFilename = "", $ThisTodisplayExtension = "" For $i = 1 To $listFiles[0] Local $listFilesPathSplit = _PathSplit($listFiles[$i], $ThisTodisplayDrive, $ThisTodisplayDir, $ThisTodisplayFilename, $ThisTodisplayExtension) If(StringCompare(".lnk", $ThisTodisplayExtension, 2) == 0) Then ;Local $ThisTodisplayLNK = f$listFiles[$i] Local $thisToDisplayLNKArray = FileGetShortcut($listFiles[$i]) If(NOT @error) Then If($thisToDisplayLNKArray[0] <> "") Then ;_ArrayDisplay($thisToDisplayLNKArray) ;$ThisTodisplayLNKtarget = $thisToDisplayLNKArray[0] ;$ThisTodisplayLNKargs = $thisToDisplayLNKArray[2] ;$ThisTodisplayLNKworkingdir = $thisToDisplayLNKArray[1] $ThisTodisplayList &= "LNK: " & $ThisTodisplayDrive & $ThisTodisplayDir & $ThisTodisplayFilename & $ThisTodisplayExtension & @CRLF $ThisTodisplayList &= "Target: " & $thisToDisplayLNKArray[0] & " " & $thisToDisplayLNKArray[2] & @CRLF $ThisTodisplayList &= "Workingdir:" & $thisToDisplayLNKArray[1] & @CRLF $ThisTodisplayList &= @CRLF $ThisTodisplayList &= "========================" & @CRLF EndIf EndIf EndIf Next ; _ArrayDisplay($listFiles, "$aFileList") $GuiTodisplay = GUICreate("Summary of LNK Files Found In: " & $dirToSearch, 1152, 864) ; Local $idTreeview = GUICtrlCreateTreeView(6, 6, 1152, 1046, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) $hEdit = GUICtrlCreateEdit($ThisTodisplayList, 4, 4, 1144, 772, BitOr($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) $hButtonContinue = GUICtrlCreateButton("Continue", 4, 776, 1144, 80) GUICtrlSetState($hButtonContinue ,$GUI_DEFBUTTON) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GuiDelete($GuiTodisplay) ExitLoop Case $hButtonContinue GuiDelete($GuiTodisplay) ExitLoop EndSwitch WEnd ;Displaying list of Link LNK in GUI Editbox ;--------------------------------------------------------------- $modalSimulMode = MsgBox (3, "Simulated mode?" ,"Would you like to perform this substring replacement of link files in simulated mode? In simulated mode you will see what would have happened in a file named" & @CRLF & "LNKSubstringReplacer Results.txt" & @CRLF & @CRLF & "but no changes will be made" & @CRLF & @CRLF & "Yes - simulated mode, no changes will be made" & @CRLF & "No - resaving mode, changes will be made") If $modalSimulMode = 2 Then Exit ElseIf $modalSimulMode = 6 Then $saveAgain = False ElseIf $modalSimulMode = 7 Then $saveAgain = True ElseIf MsgBox(0, "ERROR", "Error with asking simulated mode, exiting") EndIf Local $StrToSearch = InputBox("Specify substring to search for", "What substring would you like to be replaced for link target and link working directory?", "", "", 520, 320) ; If $StrToSearch = "" Then ; allow empty input in case just want to resave and fix all links If @error = 1 Then Exit EndIf Local $StrToReplace = InputBox("Specify substring to replace with", "All occurrences of" & @CRLF & $StrToSearch & @CRLF & @CRLF & "Contained in links in the directory " & @CRLF & $dirToSearch & @CRLF & @CRLF & "Should be replaced with what?", $StrToSearch, "", 520, 320) ; If $StrToSearch = "" Then ; allow empty input in case just want to resave and fix all links If @error = 1 Then Exit EndIf ; Processing ; Write simulated results to a text file $dateNow = @YEAR & "-" & @MON & "-" & @MDAY & "_" & @HOUR & @MIN & @SEC $fileLnkPath = @ScriptDir & "\" & $dateNow & " LNKSubstringReplacer Results.txt" FileDelete($fileLnkPath) Local $fileTextList = FileOpen($fileLnkPath, $FO_APPEND) If $fileTextList = -1 Then MsgBox(0, $fileLnkPath, "FileOpen Error, exiting") Exit EndIf FileWrite($fileTextList, "---------------------------------------" & @CRLF) FileWrite($fileTextList, "Link file to scan" & @CRLF) FileWrite($fileTextList, "Link target" & @CRLF) FileWrite($fileTextList, "Link working directory" & @CRLF) Local $thisExtension = "" Local $sDrive = "", $sDir = "", $ThisTodisplayLNKFilename = "" For $i = 1 To $listFiles[0] ; Only do LNK extension Local $listFilesPathSplit = _PathSplit($listFiles[$i], $sDrive, $sDir, $ThisTodisplayLNKFilename, $thisExtension) ; MsgBox(0, $i, $listFiles[$i] & " , " & $thisExtension) If(StringCompare(".lnk", $thisExtension, 2) == 0) Then ; If(NOT StringCompare(".lnk", $thisExtension, 2)) Then Local $thislnkArray = FileGetShortcut($listFiles[$i]) If(NOT @error) Then If($thislnkArray[0] <> "") Then ; _ArrayDisplay($lnkArray) If( StringInStr($thislnkArray[0], $StrToSearch) Or StringInStr($thislnkArray[2], $StrToSearch) Or StringInStr($thislnkArray[1], $StrToSearch) ) Then FileWrite($fileTextList, @CRLF & "---------------------------------------" & @CRLF) FileWrite($fileTextList, $listFiles[$i] & @CRLF) ; FileWrite($fileTextList, $thislnkArray[0] & @CRLF) ; FileWrite($fileTextList, $thislnkArray[2] & @CRLF) FileWrite($fileTextList, $thislnkArray[0] & $thislnkArray[2] & @CRLF) FileWrite($fileTextList, $thislnkArray[1] & @CRLF) ; Allow empty $StrToSearch or empty $strToReplace just to fix and resave all links If( ($StrToSearch = "") OR ($StrToReplace = "") ) Then $newLinkTarget = RemoveSurrQuotes($thislnkArray[0]) $newLinkTargetArgs = $thislnkArray[2] $newLinkWorkingDir = RemoveSurrQuotes($thislnkArray[1]) Else $newLinkTarget = RemoveSurrQuotes(StringReplace($thislnkArray[0], $StrToSearch, $StrToReplace)) $newLinkTargetArgs = StringReplace($thislnkArray[2], $StrToSearch, $StrToReplace) $newLinkWorkingDir = RemoveSurrQuotes(StringReplace($thislnkArray[1], $StrToSearch, $StrToReplace)) EndIf ; Remove ending backslash from working dir While (StringRight($newLinkWorkingDir, 1) = "\") $newLinkWorkingDir = StringTrimRight($newLinkWorkingDir, 1) WEnd If($saveAgain) Then FileWrite($fileTextList, @CRLF & "found " & @CRLF & "Resaved:" & @CRLF) FileWrite($fileTextList, $listFiles[$i] & @CRLF) FileWrite($fileTextList, $newLinkTarget & " " & $newLinkTargetArgs & @CRLF) FileWrite($fileTextList, $newLinkWorkingDir & @CRLF) $saveResult = FileCreateShortcut( _ $newLinkTarget, _ $listFiles[$i], _ $newLinkWorkingDir, _ $newLinkTargetArgs, _ $thislnkArray[3], _ $thislnkArray[4], _ "", _ $thislnkArray[5], _ $thislnkArray[6] _ ) If(NOT $saveResult) Then FileWrite($fileTextList, "ERROR Unable to resave: " & $listFiles[$i] & @CRLF) EndIf Else FileWrite($fileTextList, @CRLF & "found " & @CRLF & "Simulated Resave:" & @CRLF) FileWrite($fileTextList, $listFiles[$i] & @CRLF) FileWrite($fileTextList, $newLinkTarget & " " & $newLinkTargetArgs & @CRLF) FileWrite($fileTextList, $newLinkWorkingDir & @CRLF) EndIf EndIf Else FileWrite($fileTextList, @CRLF & "---------------------------------------" & @CRLF) FileWrite($fileTextList, $listFiles[$i] & @CRLF) FileWrite($fileTextList, "Found empty link target, skipping " & @CRLF) EndIf Else FileWrite($fileTextList, @CRLF & "---------------------------------------" & @CRLF) FileWrite($fileTextList, $listFiles[$i] & @CRLF) FileWrite($fileTextList, "FileGetShortcut Error, skipping " & @CRLF) Exit EndIf ;Else ; FileWrite($fileTextList, @CRLF & "---------------------------------------" & @CRLF) ; FileWrite($fileTextList, $listFiles[$i] & @CRLF) ; FileWrite($fileTextList, "Skipping not a link file" & @CRLF) EndIf Next FileClose($fileTextList) MsgBox (64,"Done - Check Log for details","Done - Check Log for details of what was done:" & @CRLF & @CRLF & $fileLnkPath) ;--------------------------------------------------------------- Func RemoveSurrQuotes($myString) Return StringReplace($myString, '"', '') EndFunc ;--------------------------------------- LNKSubstringReplacer.au3 _RecFileListToArray.au3
  2. Thanks, just what I was looking for to start learning GDI Plain. If you also have any other links talking about advantages of using GDI Plain over using GDI Plus - that would be much appreciated. Edit: Previous results were skewed due to GDIPlain version showing FPS with GUICtrlSetData instead of WinSetTitle which was slowing it down. GDIPlain indeed is faster than GDIPlus. With FPS() functions in both showing FPS using WinSetTitle(), showing Cube.3DA I get 440 fps with GDIPlain and 310 fps with GDIPlus. (Test machine is WinXP SP3 x86 with Intel HD 4000 Integrated Graphics). Thx! Test cases of both with anti-aliasing off: GDI Plain: StartUp(800, 600, False, 0, 0, 0, 0, 0, 0, 900, 999, 0.5, True) LoadModelFromFile(".\Cube.3DA")GDI Plus: ASE_Initialize(".\Cube.3DA", 800, 600, False, 0, 0, 0, 0, 0, 0, 900, 999, 0, 0.5, 0)
  3. Could you share your plain GDI version? I am interested in the plain version with no includes and ultra speed. Thanks!
  4. '?do=embed' frameborder='0' data-embedContent>> ?do=embed#entry576433'' frameborder='0' data-embedContent>>
  5. Usually having the same content in two different locations is a recipe for future disaster in terms of inconsistency and confusion - especially for something important such as documentation where small technical details change over time and where small technical details can break programs. I don't think that the help file should be in two separate locations. Either "autoitscript.com/autoit3/docs/" or "autoitscript.com/wiki/" but not both. http://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm http://www.autoitscript.com/wiki/AutoItSetOption Also I'm not really a fan of the MediaWiki layout. The left sidebar is a huge waste of space and is hardly ever used. Left sidebar's should contain Table of Contents, not "Toolbox" elements (which could rather be put in a dropdown menu on the top right". A left sidebar should contain a navigational tree with a hierarchy of the pages - otherwise it should be removed.
  6. You can get the coordinates of the four corners of the desktop (screen area excluding the taskbar) and thus consequently height and width of the desktop with _WinAPI_SystemParametersInfo($SPI_GETWORKAREA). See here for working example: Then you can use WinMove.
  7. If you're reading the same piece of data repeatedly every 30 seconds and there is no other disk activity going on - then I assume that Windows filesystem cache would cache that read so that repeated reads would be served from RAM instead of from disk. Sysinternals Diskmon will show you activity on the disk. http://technet.microsoft.com/en-us/sysinternals/bb896646.aspx Sysinternals Process Monitor will show you activity to the filesystem. http://technet.microsoft.com/en-in/sysinternals/bb896645.aspx You can run both Diskmon and ProcMon side by side. And you will see that all the filesystem requests that show up in ProcMon don't show up DiskMon. When file system activity shows up in ProcMon but not in DiskMon that means that the file got served from the filesystem cache in RAM. If you want to try to do the operation fully in RAM, You can also: 1. Extend your filesystem cache using a tool such as PrimoCache, eBoostr, or Superspeed Supercache. Windows filesystem caches on a file level basis - these additional caches will then also add another cache layer on top of that to cache reads and writes on a block level basis. 2. Make everything operate off of a RAMDisk by creating a RAMDisk and then junction the directory where the log file will be created to a directory on the RAMDisk.
  8. Read about INI Files: http://en.wikipedia.org/wiki/INI_file http://www.autoitscript.com/autoit3/docs/functions/IniRead.htm http://www.autoitscript.com/autoit3/docs/functions/IniWrite.htm
  9. Check out eval() and calc() functions by Laszlo and derRaphael. They have an extensible parser architecture built to be able to handle custom functions. http://www.autohotkey.com/board/topic/15675-monster-evaluate-math-expressions-in-strings/ http://www.autohotkey.com/board/topic/59087-func-calc-math-expression-evaluation-incl-brackets/ These are in AHK, but could easily be adapted to AU3. The idea is that you can use notepad to type in your expression such as ((sqrt(2))/2-5)/fib(12)+cos(180) - then you select the expression in notepad and push a hotkey to get the evaluation of the selected text.
  10. Instead of hard coding paths such as "C:batchborgTestCreeper.au3", you could use @ScriptDir and @ScriptFullPath. Then people could try it out on their own computers. http://www.autoitscript.com/autoit3/docs/macros.htm Also checkout Firefox's function _GuiRoundCorners if you want to make to make your notification boxes have rounded corners:
  11. Sorry for bumping an old thread, but was also previously looking for this a long time and was discouraged when found this thread on Google saying it can't be done. However after much searching, there is a good pre-made solution for all to be aware of:
  12. For those of us who install AutoIt manually from ZIP into portable folder (and without any registry entries) - instead of reading the AutoIt path from the registry could the program also first check to read the AutoIt path from an INI file?
  13. Nevermind, sorry, didn't read whole thread. Wrong information deleted.
  14. FYI - this tool is very good with and was inspired by my use of hstart. Highly recommended: http://www.ntwind.com/software/hstart.html For example, with hstart.exe you can launch multiple BAT files or EXE commands to run in parallel and without showing console with the /NOCONSOLE command, for example, this launches 3 batch files with multiple arguments (and without ever showing any windows): hstart.exe /NOCONSOLE ""C:\program files\folderblue\processblue.bat" "blue arg 1" "blue arg 2" "blue arg 3"" ""C:\program files\folderred\processred.bat" "red arg 1" "red arg 2" "red arg 3"" ""C:\program files\foldergreen\processgreen.bat" "green arg 1" "green arg 2" "green arg 3"" Notice how this lnk file would get very unwieldy for the Windows edit properties dialog but LNKEditorGUI would handle it with ease.
  15. Scenario: Editing .lnk shortcuts with the Windows dialog is very frustrating due to the small input boxes and non-resizable small dialog window. Very often you need to create a link with a long path and many arguments which becomes hard to see and make edits. Solution: LNKEditorGUI is a resizable and easy to use creator and editor of LNK Windows Shortcut files. This GUI uses built-in AutoIt functions FileGetShortcut() and FileCreateShortcut() to read and write .lnk files. A nice and big (and resizable) GUI is presented with which the user can easily edit and create LNK shortcuts with. A command line argument is accepted and the GUI will automatically open the first file passed to it as an argument allowing for easy association on the right-click menu (see .lnk file right-click context menu registry association example below). Download: LNKEditorGUI.zip Screenshot: Reg Script Use a Registry Script such as following to create a right-click menu entry for LnkEditorGUI for .lnk files. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\lnkfile\shell\LNKEditorGUI] @="LNK&EditorGUI" [HKEY_CLASSES_ROOT\lnkfile\shell\LNKEditorGUI\command] @="\"C:\\Program Files\\LNKEditorGUI.exe\" \"%1\"" LNKEditorGUI.au3 Code: #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <ComboConstants.au3> #include <GuiStatusBar.au3> #include <Timers.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) Global Const $CmbWinstateNorm = @SW_SHOWNORMAL & " - Normal Window" Global Const $CmbWinstateMin = @SW_SHOWMINNOACTIVE & " - Minimized" Global Const $CmbWinstateMax = @SW_SHOWMAXIMIZED & " - Maximized" #region - GUI $GUI = GUICreate("LNKEditorGUI - Windows Shortcut LNK File Editor", 800, 640, -1, -1, BitOr($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX ), $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, '_exit') GUISetOnEvent($GUI_EVENT_DROPPED, "On_Drop_InFilename") GUISetFont(10) $Status = _GUICtrlStatusBar_Create($GUI) GUICtrlCreateLabel("File:", 4, 6, 36, 24) $inFilename = GUICtrlCreateInput("", 36, 4, 672, 24) GUICtrlSetState(-1, $GUI_DROPACCEPTED) $btBrowseForFile = GUICtrlCreateButton("Browse...", 712, 4, 84, 24) GUICtrlSetOnEvent(-1, '_btBrowseForFile') $btOpenFile = GUICtrlCreateButton("Load LNK File", 20, 32, 370, 28) GUICtrlSetOnEvent(-1, '_btOpenFile') GUICtrlSetResizing($btOpenFile, $GUI_DOCKLEFT) $btSaveFile = GUICtrlCreateButton("Save LNK File", 410, 34, 370, 28) GUICtrlSetOnEvent(-1, '_btSaveFile') GUICtrlSetResizing($btSaveFile, $GUI_DOCKRIGHT) GUICtrlCreateLabel("Target EXE", 4, 80, 172, 24) $inTargetEXE = GUICtrlCreateInput("", 4, 104, 792, 24) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlCreateLabel("Target Arguments", 4, 148, 172, 24) $editTargetArgs = GUICtrlCreateEdit("", 4, 172, 792, 96, $ES_MULTILINE) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlCreateLabel("Working Dir", 4, 288, 172, 24) $inWorkingDir = GUICtrlCreateInput("", 4, 312, 792, 24) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlCreateLabel("Window State", 4, 356, 172, 24) $cmbWindowState = GUICtrlCreateCombo("", 4, 380, 792, 24, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, $CmbWinstateNorm & "|" & $CmbWinstateMin & "|" & $CmbWinstateMax, $CmbWinstateNorm) ; add other item snd set a new default GUICtrlCreateLabel("Icon File", 4, 424, 172, 24) $inIconFile = GUICtrlCreateInput("", 4, 448, 650, 24) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlCreateLabel("Icon Index", 680, 424, 172, 24) $inIconIndex = GUICtrlCreateInput("", 674, 448, 112, 24) GUICtrlCreateLabel("Comment", 4, 492, 172, 24) $editComment = GUICtrlCreateEdit("", 4, 516, 792, 96, $ES_MULTILINE) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState(@SW_SHOW, $GUI) #endregion - GUI If $CmdLine[0] > 0 Then ;MsgBox(0,0,$CmdLine[1]) GUICtrlSetData($inFilename, $CmdLine[1]) _btOpenFile() EndIf While 1 Sleep(100) WEnd ;--------------------------------------------------------------- Func StatusBarNotify($msg) _GUICtrlStatusBar_SetText($Status, $msg) _Timer_SetTimer($GUI, 5000, "_ClearStatusBar") EndFunc ;--------------------------------------------------------------- Func _ClearStatusBar($hWnd, $msg, $iIDTimer, $dwTime) #forceref $hWnd, $msg, $iIDTimer, $dwTime _GUICtrlStatusBar_SetText($Status, "") _Timer_KillTimer($hWnd, $iIDTimer) EndFunc ;--------------------------------------------------------------- Func _btBrowseForFile() Local $var = FileSaveDialog("Choose a LNK File Name", "D:\", "LNK Shortcuts (*.lnk)", 2) ; option 2 = dialog remains until valid path/file selected If @error Then ;MsgBox(4096, "", "No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) GUICtrlSetData($inFilename, $var) EndIf EndFunc ;--------------------------------------------------------------- Func On_Drop_InFilename() If ( (@GUI_DropId = $inFilename) OR (@GUI_DropId = $inTargetEXE) ) Then GUICtrlSetData(@GUI_DropId, @GUI_DragFile) EndIf If ( (@GUI_DropId = $inFilename) AND (@GUI_DragFile <> "") ) Then OpenFile(@GUI_DragFile) EndIf EndFunc ;--------------------------------------------------------------- Func _btOpenFile() Local $filename = GUICtrlRead($inFilename) If $filename = "" Then ;_btBrowseForFile() ;$filename = GUICtrlRead($inFilename) StatusBarNotify("ERROR: Trying to open file but no file specified.") MsgBox(0,"ERROR","Trying to open file but no file specified.") Else OpenFile($filename) EndIf EndFunc ;--------------------------------------------------------------- Func OpenFile($filename) Local $lnkArray = FileGetShortcut($filename) If Not @error Then ;_ArrayDisplay($lnkArray) Else StatusBarNotify("ERROR: Unable to open file.") MsgBox(0,"ERROR","Unable to open file, please check the file name.") Return EndIf GUICtrlSetData($inTargetEXE, $lnkArray[0]) GUICtrlSetData($editTargetArgs, $lnkArray[2]) GUICtrlSetData($inWorkingDir, $lnkArray[1]) GUICtrlSetData($inIconFile, $lnkArray[4]) GUICtrlSetData($inIconIndex, $lnkArray[5]) GUICtrlSetData($editComment, $lnkArray[3]) If($lnkArray[6] = @SW_SHOWNORMAL) Then GUICtrlSetData($cmbWindowState, $CmbWinstateNorm) ElseIf($lnkArray[6] = @SW_SHOWMINNOACTIVE) Then GUICtrlSetData($cmbWindowState, $CmbWinstateMin) ElseIf($lnkArray[6] = @SW_SHOWMAXIMIZED) Then GUICtrlSetData($cmbWindowState, $CmbWinstateMax) EndIf StatusBarNotify("Successfully loaded file: " & $filename) EndFunc ;--------------------------------------------------------------- Func _btSaveFile() $filename = GUICtrlRead($inFilename) If $filename = "" Then StatusBarNotify("ERROR: Trying to save but no file name specified.") MsgBox(0,"ERROR","Trying to save but no file name specified.") Return EndIf Local $WinStateToWrite Switch GuiCtrlRead($cmbWindowState) Case $CmbWinstateNorm $WinStateToWrite = @SW_SHOWNORMAL Case $CmbWinstateMin $WinStateToWrite = @SW_SHOWMINNOACTIVE Case $CmbWinstateMax $WinStateToWrite = @SW_SHOWMAXIMIZED Case Else $WinStateToWrite = @SW_SHOWNORMAL EndSwitch $saveResult = FileCreateShortcut(GuiCtrlRead($inTargetEXE), $filename, GuiCtrlRead($inWorkingDir), GuiCtrlRead($editTargetArgs), GuiCtrlRead($editComment), GuiCtrlRead($inIconFile), "", GuiCtrlRead($inIconIndex), $WinStateToWrite) If($saveResult) Then StatusBarNotify("Successfully saved file to: " & $filename) Else StatusBarNotify("ERROR: Unable to save file, please check the file name and values.") MsgBox(0,"ERROR","Unable to save file, please check the file name and values.") EndIf EndFunc ;--------------------------------------------------------------- Func _exit() Exit EndFunc ;---------------------------------------------------------------
×
×
  • Create New...