Zeronic Posted June 28, 2013 Share Posted June 28, 2013 (edited) The Intent of the scipt is to complete two task: One create symbolic links of a folder Two create a shortcut to a file and place it on the desktop. It is for a game but I don't intent to make interact with the game or allow the script to launch the game itself. I'm having trouble with the Input box that is used to tell how many cycles the script to run for. Or how many symbolic links to create with shortcuts. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Local $EvePath, $EveCreate = 0, $EveCycle If @OSArch = "X86" Then $EvePath = "C:\Program Files\CCP\Eve" If @OSArch = "X64" Then $EvePath = "C:\Program Files(x86)\CCP\Eve" $Menu = GUICreate("Eve Online Clone Creater", 527, 125, 192, 124) $Finder = GUICtrlCreateButton("Eve Folder", 200, 24, 89, 49) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Close = GUICtrlCreateButton("Close", 424, 24, 89, 49) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Eve = GUICtrlCreateInput($EvePath, 8, 96, 513, 24) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateLabel("Clones to Create", 48, 24, 103, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Number = GUICtrlCreateInput($EveCreate, 48, 48, 97, 24) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Create = GUICtrlCreateButton("Create", 312, 24, 89, 49) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Close Exit Case $Finder Run01() Case $Create GUICtrlRead($Number, 0) GUICtrlRead($EveCreate, 0) GUICtrlSetData($EveCycle, $EveCreate) MsgBox(0, "Cycle Value", $EveCycle) MsgBox(0, "To Create", $EveCreate) MsgBox(0, "Number", $Number) Run02() EndSwitch WEnd Func Run01() Local $EvePath = FileSelectFolder("Select the Eve Folder",$EvePath) GUICtrlSetData($Eve, $EvePath) EndFunc Func Run02() While $EveCycle >= 0 MsgBox(0, "Cycle", $EveCycle) FileCreateNTFSLink ( $EvePath, $EvePath & "." & $EveCreate) MsgBox(0, "Step 2", $EvePath) MsgBox(0, "Step 3", $EvePath & "." & $EveCreate) FileCreateShortcut ( $EvePath & "." & $EveCreate & "\bin\Exefile.exe", @DesktopDir & "\Eve." & $EveCreate & ".lnk", $EvePath & "\bin") MsgBox(0, "Step 4", $EvePath & "." & $EveCreate & "\bin\Exefile.exe") MsgBox(0, "Step 5", @DesktopDir & "\Eve." & $EveCreate & ".lnk") Msgbox(0, "Step 6", $EvePath & "." & $EveCreate & "\bin") $EveCycle-=1 WEnd EndFunc Edited June 28, 2013 by Zeronic Link to comment Share on other sites More sharing options...
water Posted June 28, 2013 Share Posted June 28, 2013 And the question is? BTW: What is the difference to the thread you got locked on thsi subject? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 28, 2013 Moderators Share Posted June 28, 2013 Hi,The last thread on this subject was locked following some incorrect information from another user. After discussions I am happy for the OP to receive help for this script - as long as it stays limited to the creation of links and shortcuts and does not have anything to do with the game itself. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Zeronic Posted June 28, 2013 Author Share Posted June 28, 2013 Hi, The last thread on this subject was locked following some incorrect information from another user. After discussions I am happy for the OP to receive help for this script - as long as it stays limited to the creation of links and shortcuts and does not have anything to do with the game itself. M23 Yes, This has been my plan from the beginning. I don't ever want to make something that would interact with any game. Just trying to make the user experince a bit easier. Link to comment Share on other sites More sharing options...
water Posted June 28, 2013 Share Posted June 28, 2013 "I'm having trouble with the Input box that is used to tell how many cycles the script to run for." What exactly do you mean by "trouble"? If you enter a number how many links does it create? None, one ...? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Solution careca Posted June 28, 2013 Solution Share Posted June 28, 2013 If i understood your problem, check this out. Removed msgboxes and some stuff that did nothing. Tell us if this is in the lines of what you need. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #region ### START Koda GUI section ### Form= Local $EvePath, $EveCycle, $EveCreate, $EveCreate2 If @OSArch = "X86" Then $EvePath = "C:\Program Files\CCP\Eve" If @OSArch = "X64" Then $EvePath = "C:\Program Files(x86)\CCP\Eve" $Menu = GUICreate("Eve Online Clone Creater", 527, 125, 192, 124) $Finder = GUICtrlCreateButton("Eve Folder", 200, 24, 89, 49) GUICtrlSetOnEvent($Finder, "Run01") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Close = GUICtrlCreateButton("Close", 424, 24, 89, 49) GUICtrlSetOnEvent($Close, "Close") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Eve = GUICtrlCreateInput($EvePath, 8, 96, 513, 24) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateLabel("Clones to Create", 48, 24, 103, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Number = GUICtrlCreateInput('1', 48, 48, 97, 24) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Create = GUICtrlCreateButton("Create", 312, 24, 89, 49) GUICtrlSetOnEvent($Create, "Run02") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") #endregion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Run01() Local $EvePath = FileSelectFolder("Select the Eve Folder", $EvePath) GUICtrlSetData($Eve, $EvePath) EndFunc ;==>Run01 Func Run02() $Number2 = GUICtrlRead($Number, 0) For $i = 1 To $Number2 FileCreateShortcut($EvePath & "." & $i & "\bin\Exefile.exe", @DesktopDir & "\Eve." & $i & ".lnk", $EvePath & "\bin") Next EndFunc ;==>Run02 Func Close() Exit EndFunc ;==>Ru Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Zeronic Posted June 28, 2013 Author Share Posted June 28, 2013 If i understood your problem, check this out. Removed msgboxes and some stuff that did nothing. Tell us if this is in the lines of what you need. Yeah, I think you got what I was trying to do. Looks like I wasn't storing the number that the GUICtrlRead was reading. I'm still very much a newbie at this but this gives me a far better understanding of how this works. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now