JeffQOOQAAA Posted August 3, 2017 Posted August 3, 2017 Dears I want to pass more parameters to another script, but as below command can't work How to do this? Run(@ScriptDir & '\Determine.exe ' & $Poolname & $ComputerName, '', @SW_MINIMIZE) Determine.exe code Global $bDebug = True If $bDebug Then Global $hOpen = FileOpen(@ScriptDir & '\Determine.log', 1) If $CmdLine[0] > 0 Then If $bDebug Then _DebugLog('$CmdLineRaw = ' & $CmdLineRaw) Local $Filter = RunWait(@ComSpec & " /c " & @ScriptDir &'\HLK_Filter.bat') _Determine($CmdLineRaw) EndIf FileClose($hOpen) Func _DebugLog($sString) FileWrite($hOpen, @YEAR & '\' & @MON & '\' & @MDAY & ' ' & @HOUR & ':' & @MIN & ':' & @SEC & ' :: ' & $sString & @CRLF) EndFunc Func _Determine($Poolname, $ComputerName ) Endfunc
n3wbie Posted August 3, 2017 Posted August 3, 2017 You Can Just Create A Ini File And Pass Ini File As Parameter and in ini file you can specify more parameters
spudw2k Posted August 4, 2017 Posted August 4, 2017 At first glance, I think the problem with your example is your _Determine function has two parameters, but you are trying to pass only one ($CmdLineRaw) in your If $CmdLine[0] statement. Ini may be a good option, but you can search the forum for other Inter-Process Communication techniques (mailslot for example) if you don't want to have to rely on writing to the disk. Reveal hidden contents Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
JeffQOOQAAA Posted August 4, 2017 Author Posted August 4, 2017 @spudw2k @n3wbie Sorry, could you help to me how to use Ini file? lni can pass more parameters to another .au3? Due to I have to .au3 need to pass parameters
spudw2k Posted August 4, 2017 Posted August 4, 2017 The AutoIt INIWrite* and INIRead* functions will allow you write contents to and read from an INI text file respectively. There are examples in the help file. Reveal hidden contents Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Confuzzled Posted August 14, 2017 Posted August 14, 2017 Have you deliberately concatenated $Poolname and $ComputerName or should you have a delimiter between them? Just curious what is the value of each of them during runtime?
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