Leaderboard
Popular Content
Showing content with the highest reputation on 11/12/2018 in all areas
-
As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.1 point
-
*** FREE*** April 9, 2007 Download XProtec.au3 - Free Original XProTec - v1.0.5 - March 18, 2007 XProTec.au3 Previous downloads = 820 +/- Protect and get Paid for.... Your Program Features: *New* Limited Freeware Option Example end user must register. automated email notifications to developer. trial period. user license. registration price. registration reminder. automated registration and acceptance of payment. ( your paypal account ) Syntax: Must be compiled #include<XProTec.au3> ; MUST BE AN INCLUDE $D_Mail = "developer@msn.com " ; your email $D_Program = "My_Program_Name" ; your program name $U_Price = "20.00" ; the amount of money you wish to be payed by the user $U_Trial = "30" ; amount of days for the trial period $U_License = "3" ; 3 = one computer only - see license notes $D_License = "123456789" ; developers license # $D_PayPal = "www.paypal.com/my account-link to paypal" ; - paypal link $D_Link = "www.mywebsite.com/.../" ; looks for "www.mywebsite.com/.../Blacklist.txt" ; see Blacklist $U_Return = 1 ; pay or quit .... or $U_Return = 0 ; will return control to developer with @extended = 6 [Limited Freeware Option] XProTec($D_Mail, $D_Program, $U_Price, $U_Trial, $U_License, $D_License, $D_PayPal, $D_Link, $U_Return) ; your script starts here ..............1 point
-
Thy, welcome to autoitscript forum This seems to do it : MsgBox(0, '', StringRegExp($string, '(?:\w.?\s)+[\w\d].', 3)[0]) Deye1 point
-
Google Authenticator Implementation
Lefiya reacted to argumentum for a topic
The " == 8", I do not see anywhere AND would be useless. The StringLen($OfGenertatedTOTP) would be 6 anyway ( as declared in the example). As long as the 2 devices ( the server side and client side ) have the same time ( UTC time ), the original code shows to perform as advertised. PS: The " == 8" is because you added the "@CRLF" in your implementation and ConsoleWrite reports to have written 6 ( $OfGenertatedTOTP ) + 2 ( @CRLF ). The rest I can not understand, as I am not a programmer. Just a kind soul to copy and paste to see if it works, or not. =/ I can no longer help. And since you are attempting a new implementation, kindly use the help and support forum, referencing this topic.1 point -
Get file path from parameter string
musicstashall reacted to AdamUL for a topic
There WinAPI UDF functions included to do this. Use _WinAPI_PathGetArgs and/or _WinAPI_CommandLineToArgv. You might also need _WinAPI_PathRemoveArgs for just the path itself. Example below. #include <Array.au3> #include <WinAPIShPath.au3> Global $aPath[5] $aPath[0] = '%SystemRoot%\System32\cmd.exe /C "%1" %*' $aPath[1] = '%windir%\system32\mmc.exe /s %SystemRoot%\system32\devmgmt.msc /s' $aPath[2] = '%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1' $aPath[3] = '%SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Appearance /Action:OpenMSTheme /file:"%1"' $aPath[4] = 'C:\Windows\System32\RUNDLL32.EXE "C:\Windows\System32\scrobj.dll",GenerateTypeLib "%1"' Global $aArgs = 0 For $i = 0 To UBound($aPath) - 1 ConsoleWrite("Path only: " & _WinAPI_PathRemoveArgs($aPath[$i]) & " Arguments: " & _WinAPI_PathGetArgs($aPath[$i]) & @CRLF) $aArgs = _WinAPI_CommandLineToArgv($aPath[$i]) _ArrayDisplay($aArgs, "Path & Arguments Array") Next Adam1 point -
Regex... Repeating Block of Regex
gruntydatsun reacted to mikell for a topic
... and there is nothing more to do but add the \K ("keep out") verb $sAfter = StringRegExpReplace($sBefore, "(?m)(^\s{3}<null/>\s\r\n){3}\K", "$1") Edit Please note that as \K is used here as a lookbehind alternative, obviously this works too $sAfter = StringRegExpReplace($sBefore, "(?m)(?<=(^\s{3}<null/>\s\r\n){3})", "$1")1 point -
program keeps looping when i type in or
yasha reacted to FrancescoDiMuro for a topic
@yasha You're welcome1 point -
program keeps looping when i type in or
yasha reacted to FrancescoDiMuro for a topic
@yasha The Or statement needs "something" to compare with, so: If $selectedflag[$charcnt] = 18 Or $selectedflag[$charcnt] = 21 Then ; Do whatever you want EDIT: Little tips! You can short this $charcnt = $charcnt + 1 like this $charcnt += 11 point -
The most interesting type of code I have ever seen...1 point
-
Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. ..and @VIP, You really should already know better! You do tell the OP that it isn't allowed but still give pointers? Don't do that again! See you soon with a legitimate question I hope. The Moderation team1 point
-
how do i wait till macro is finished to run auto it
yasha reacted to FrancescoDiMuro for a topic
@yasha You could use _Excel_* functions to interact with Excel1 point -
If only one instance of excel is running (which is started by your script) you could simply use WinWaitclose. or while 1 if not ProcessExists("excel.exe") Then ExitLoop Sleep(250) wend1 point
-
Here is a complete GUI example: #include <ClipBoard.au3> #include <ClipBoard.au3> #include <array.au3> #include <Date.au3> #include <Excel.au3> #include <ExcelConstants.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> AutoItSetOption("WinTitleMatchMode", 2) AutoItSetOption('MouseCoordMode', 0) #Region ### START GUI section ### Form= Global $hGUI = GUICreate("Baan Reports", 517, 260, 338, 233) GUICtrlCreateGroup("Reports Selection", 8, 8, 489, 57) Global $Select_Cb1 = GUICtrlCreateCheckbox("1 SO", 24, 32, 55, 17) Global $Select_Cb2 = GUICtrlCreateCheckbox("2 Prod", 80, 32, 55, 17) Global $Select_Cb3 = GUICtrlCreateCheckbox("3 Pur", 136, 32, 55, 17) Global $Select_Cb4 = GUICtrlCreateCheckbox("4 Pro", 192, 32, 55, 17) Global $Select_Cb5 = GUICtrlCreateCheckbox("5 Claim", 248, 32, 55, 17) Global $Select_Cb6 = GUICtrlCreateCheckbox("6 Buy", 304, 32, 55, 17) Global $Select_Cb7 = GUICtrlCreateCheckbox("7 PR", 368, 32, 55, 17) Global $Select_Cb8 = GUICtrlCreateCheckbox("8 all", 432, 32, 55, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateLabel("Select a Folder:", 8, 80, 78, 17, $SS_RIGHT) Global $Input_Folder = GUICtrlCreateInput(@DesktopDir & "\Report", 96, 76, 361, 21) Global $Button_SelectFolder = GUICtrlCreateButton("...", 464, 72, 27, 25) GUICtrlCreateLabel("Windows Tile:", 8, 112, 84, 17, $SS_RIGHT) Global $Input_WinTile = GUICtrlCreateInput("Menu browser [User: ", 96, 104, 393, 21) Global $Button_Start = GUICtrlCreateButton("START", 8, 136, 227, 49) Global $Button_Stop = GUICtrlCreateButton("STOP (ESC)", 256, 136, 171, 49) GUICtrlSetTip($Button_Stop, "Note: On started need Press Hotkey", "Key: ESC", 1) Global $Label_sStatus = GUICtrlCreateLabel("", 8, 200, 500, 17, -1, $GUI_WS_EX_PARENTDRAG) Global $Label_iStatus = GUICtrlCreateLabel("--- READY ----", 8, 232, 500, 17, $SS_CENTER, $GUI_WS_EX_PARENTDRAG) Global $Button_Exit = GUICtrlCreateButton("EXIT (F4)", 448, 136, 57, 49) GUICtrlSetTip($Button_Exit, "Note: On started need Press Hotkey", "Key: F4", 1) GUISetState(@SW_SHOW) #EndRegion ### START GUI section ### Form= Global $nMsg, $iSelect_1 = 0, $iSelect_2 = 0, $iSelect_3 = 0, $iSelect_4 = 0, $iSelect_5 = 0, $iSelect_6 = 0, $iSelect_7 = 0, $iSelect_ALL = 0 Global $iSelectFolder, $iSelectWinTile, $iSTOP_Request = 0, $iSTARTED = 0 HotKeySet("{Esc}", "_STOP") HotKeySet("{F4}", "_Exit") _MAIN() Func _Task_1() _ShowLog("-Task 1: Woring...." & "", 1) ; CODE _ShowLog("-Task 1: END" & "", 1) Sleep(100) EndFunc ;==>_Task_1 Func _Task_2() _ShowLog("-Task 2: Woring...." & "", 1) ; CODE _ShowLog("-Task 2: END" & "", 1) Sleep(100) EndFunc ;==>_Task_2 Func _Task_3() _ShowLog("-Task 3: Woring...." & "", 1) ; CODE _ShowLog("-Task 3: END" & "", 1) Sleep(100) EndFunc ;==>_Task_3 Func _Task_4() _ShowLog("-Task 4: Woring...." & "", 1) ; CODE _ShowLog("-Task 4: END" & "", 1) Sleep(100) EndFunc ;==>_Task_4 Func _Task_5() _ShowLog("-Task 5: Woring...." & "", 1) ; CODE _ShowLog("-Task 5: END" & "", 1) Sleep(100) EndFunc ;==>_Task_5 Func _Task_6() _ShowLog("-Task 8: Woring...." & "", 1) ; CODE _ShowLog("-Task 8: END" & "", 1) Sleep(100) EndFunc ;==>_Task_6 Func _Task_7() _ShowLog("-Task 7: Woring...." & "", 1) ; CODE _ShowLog("-Task 7: END" & "", 1) Sleep(100) EndFunc ;==>_Task_7 Func _ShowLog($iLog, $OnUI = 0) ConsoleWrite($iLog & @CRLF) If $OnUI Then GUICtrlSetData($Label_iStatus, $iLog) EndFunc ;==>_ShowLog Func _START() If $iSTARTED = 1 Then Return SetError(-1, 0, 0) ; STARTED $iSTARTED = 1 ;~ Local $Nowtime = @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC ;~ Local $YY = StringFormat("%02i", @YEAR - 2000) ;~ Local $MM = StringFormat("%02i", Int(@MON)) ;~ Local $DD = StringFormat("%02i", Int(@MDAY)) Local $ReturnValue, $iError = 0 While _WindowsExist($iSelectWinTile) $ReturnValue = 0 $iError = 0 If $iSelect_ALL Then $ReturnValue = _Task_1() $iError = @error $ReturnValue += _Task_2() $iError = @error $ReturnValue += _Task_3() $iError = @error $ReturnValue += _Task_4() $iError = @error $ReturnValue += _Task_5() $iError = @error $ReturnValue += _Task_6() $iError = @error $ReturnValue += _Task_7() $iError = @error Else If $iSelect_1 Then $ReturnValue = _Task_1() $iError = @error EndIf If $iSelect_2 Then $ReturnValue = _Task_2() $iError = @error EndIf If $iSelect_3 Then $ReturnValue = _Task_3() $iError = @error EndIf If $iSelect_4 Then $ReturnValue = _Task_4() $iError = @error EndIf If $iSelect_5 Then $ReturnValue = _Task_5() $iError = @error EndIf If $iSelect_6 Then $ReturnValue = _Task_6() $iError = @error EndIf If $iSelect_7 Then $ReturnValue = _Task_7() $iError = @error EndIf EndIf ;~ _ShowLog("-$iSelectWinTile : " & $iSelectWinTile &"") ;~ _ShowLog("-$iSelect_1 : " & $iSelect_1 &"") ;~ _ShowLog("-$iSelect_2 : " & $iSelect_2 &"") ;~ _ShowLog("-$iSelect_3 : " & $iSelect_3 &"") ;~ _ShowLog("-$iSelect_4 : " & $iSelect_4 &"") ;~ _ShowLog("-$iSelect_5 : " & $iSelect_5 &"") ;~ _ShowLog("-$iSelect_6 : " & $iSelect_6 &"") ;~ _ShowLog("-$iSelect_7 : " & $iSelect_7 &"") ;~ _ShowLog("-$iSelect_ALL : " & $iSelect_ALL &"") ;~ _ShowLog("-----------------------------------" &"") If (($iError) Or ($ReturnValue = -1) Or ($iSTOP_Request = 1)) Then GUICtrlSetData($Label_iStatus, "--- STOPED ----") $iSTARTED = 0 Return SetError(0, -1, 0) EndIf WEnd $iSTARTED = 0 EndFunc ;==>_START Func _WindowsExist($iSelectWinTile) If Not WinExists($iSelectWinTile) Then MsgBox(48, "Error", 'The Windows "' & $iSelectWinTile & '" is Not Exists !') _ShowLog("! Error: The Windows " & $iSelectWinTile & " is Not Exists !") Return SetError(-1, 0, 0) EndIf Return 1 EndFunc ;==>_WindowsExist Func _STOP() If $iSTARTED = 0 Then MsgBox(64, "Error", "The process not STARTED for STOP !") Return 0 EndIf If $iSTOP_Request = 0 Then Local $ans = MsgBox(1 + 64, "STOP_Request", "Are you sure to STOP ?") If $ans = 1 Then _ShowLog("$iSTOP_Request: 1", 1) $iSTOP_Request = 1 EndIf EndIf EndFunc ;==>_STOP Func _GetInput() $iSelectFolder = "" $iSelectWinTile = "" $iSelect_1 = 0 $iSelect_2 = 0 $iSelect_3 = 0 $iSelect_4 = 0 $iSelect_5 = 0 $iSelect_6 = 0 $iSelect_7 = 0 $iSelect_ALL = 0 _ShowLog("-----------------------------------" & "") $iSelectFolder = GUICtrlRead($Input_Folder) $iSelectWinTile = GUICtrlRead($Input_WinTile) $iSelect_1 = (GUICtrlRead($Select_Cb1) = $GUI_CHECKED) $iSelect_2 = (GUICtrlRead($Select_Cb2) = $GUI_CHECKED) $iSelect_3 = (GUICtrlRead($Select_Cb3) = $GUI_CHECKED) $iSelect_4 = (GUICtrlRead($Select_Cb4) = $GUI_CHECKED) $iSelect_5 = (GUICtrlRead($Select_Cb5) = $GUI_CHECKED) $iSelect_6 = (GUICtrlRead($Select_Cb6) = $GUI_CHECKED) $iSelect_7 = (GUICtrlRead($Select_Cb7) = $GUI_CHECKED) If ($iSelect_1 = 1 And $iSelect_2 = 1 And $iSelect_3 = 1 And $iSelect_4 = 1 And $iSelect_5 = 1 And $iSelect_6 = 1 And $iSelect_7 = 1) Then $iSelect_ALL = 1 _ShowLog("-$iSelectFolder : " & $iSelectFolder & "") _ShowLog("-$iSelectWinTile : " & $iSelectWinTile & "") _ShowLog("-$iSelect_1 : " & $iSelect_1 & "") _ShowLog("-$iSelect_2 : " & $iSelect_2 & "") _ShowLog("-$iSelect_3 : " & $iSelect_3 & "") _ShowLog("-$iSelect_4 : " & $iSelect_4 & "") _ShowLog("-$iSelect_5 : " & $iSelect_5 & "") _ShowLog("-$iSelect_6 : " & $iSelect_6 & "") _ShowLog("-$iSelect_7 : " & $iSelect_7 & "") _ShowLog("-$iSelect_ALL : " & $iSelect_ALL & "") _ShowLog("-----------------------------------" & "") GUICtrlSetData($Label_sStatus, " CB1: " & $iSelect_1 & " CB2: " & $iSelect_2 & " CB3: " & $iSelect_3 & " CB4: " & $iSelect_4 & " CB5: " & $iSelect_5 & " CB6: " & $iSelect_6 & " CB7: " & $iSelect_7 & " SelectALL: " & $iSelect_ALL) EndFunc ;==>_GetInput Func _Exit() If $iSTARTED = 0 Then Exit Else Local $ans = MsgBox(1 + 64, "EXIT_Request", "Are you sure to EXIT ?") If $ans = 1 Then Exit EndIf EndFunc ;==>_Exit Func _MAIN() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Select_Cb8 If (GUICtrlRead($Select_Cb8) = $GUI_CHECKED) Then GUICtrlSetState($Select_Cb1, $GUI_CHECKED) GUICtrlSetState($Select_Cb2, $GUI_CHECKED) GUICtrlSetState($Select_Cb3, $GUI_CHECKED) GUICtrlSetState($Select_Cb4, $GUI_CHECKED) GUICtrlSetState($Select_Cb5, $GUI_CHECKED) GUICtrlSetState($Select_Cb6, $GUI_CHECKED) GUICtrlSetState($Select_Cb7, $GUI_CHECKED) Else GUICtrlSetState($Select_Cb1, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb2, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb3, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb4, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb5, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb6, $GUI_UNCHECKED) GUICtrlSetState($Select_Cb7, $GUI_UNCHECKED) EndIf _GetInput() Case $Select_Cb1, $Select_Cb2, $Select_Cb3, $Select_Cb4, $Select_Cb5, $Select_Cb6, $Select_Cb7 _GetInput() If $iSelect_ALL = 1 Then GUICtrlSetState($Select_Cb8, $GUI_CHECKED) Else GUICtrlSetState($Select_Cb8, $GUI_UNCHECKED) EndIf Case $Button_SelectFolder Local $sFileSelectFolder = FileSelectFolder("Select a folder", @ScriptDir, 7) If @error Then ;~ MsgBox(48, "", "No folder was selected.") Else GUICtrlSetData($Input_Folder, $sFileSelectFolder) EndIf Case $Button_Start _GetInput() If (($iSelect_1 = 0) And ($iSelect_2 = 0) And ($iSelect_3 = 0) And ($iSelect_4 = 0) And ($iSelect_5 = 0) And ($iSelect_6 = 0) And ($iSelect_7 = 0) And ($iSelect_ALL = 0)) Then MsgBox(64, "Error", "You not selected any Option !") ContinueLoop EndIf If ((StringStripWS($iSelectFolder, 7) == "") Or (Not FileExists($iSelectFolder))) Then MsgBox(64, "Error", "The input folder not Selected Or not Exists !") ContinueLoop EndIf If (StringStripWS($iSelectWinTile, 7) == "") Then MsgBox(64, "Error", "The input Windows Tile is empty !") ContinueLoop EndIf GUICtrlSetData($Label_iStatus, "Working........") _START() GUICtrlSetData($Label_iStatus, "--- DONE ----") Case $Button_Stop _STOP() Case $GUI_EVENT_CLOSE, $Button_Exit _Exit() EndSwitch WEnd EndFunc ;==>_MAIN Wish you success!1 point
-
Alot comes down to what is between, can that be made into a function if $selectedflag[$charcnt] = 7 then endif1 point
-
ok, it may be just me, but i can't for the life of me understand what you mean. if you are looking for a licensing feature for your software, look here: if its something else, you may want to better describe your purpose.1 point
-
This works only when the full installer for SciTE4AutoIt3 is installed !1 point
-
Your Obfuscator is too easy to deObfucation ! Here is your ObfuscatorScript encrypted by my Obfuscator : (Attachments) Obfuscator_Obfuscated.au31 point
-
Checkbox Combo A Checkbox Combo control for multiple selections must be owner drawn to display Checkboxes. And the ListBox must remain open after an item is in/un-checked. Owner drawn Combo An owner drawn Combo control is discussed in first post. But there was one thing I forgot. For both WM_DRAWITEM and WM_MEASUREITEM messages, controlId is contained in wParam. In case of multiple Combo controls, the correct Combo can be determined by comparing controlId with wParam. Of course, it's much faster than first to create $tDIS and $tMIS structures from lParam, then extract CtlID from the structures, and finally compare controlId and CtlID. UDF and zip-file in first post updated. ListBox control An owner drawn Combo control can be implemented by subclassing the parent window. To keep the ListBox open, it's necessary to subclass the ListBox itself, and respond to WM_LBUTTONUP messages this way: Case $WM_LBUTTONUP Return 0 ; Prevents ListBox from closing This looks relatively easy in first place, but it has significant impact on the functionality of the entire Combo control. A number of smaller pieces of code must be added to make the control work normally again. Among other things AutoIt events are no longer generated for the corresponding controlID. This can be corrected by generating events for a Dummy control instead of: Case $WM_COMMAND Switch BitShift( $wParam, 16 ) ; _WinAPI_HiWord Case $CBN_CLOSEUP ; $idComboBox (Dummy control) event is generated when ListBox is closed GUICtrlSendToDummy( $aCheckboxCombo_Info[$iIdx][5] ) ; Dummy control EndSwitch Functions CheckboxCombo_Create() creates the Combo control but returns a Dummy control as mentioned above. CheckboxCombo_GetChecked() takes controlID (Dummy control) as input and returns checked items. CheckboxCombo_Delete() takes controlID (Dummy control) as input and deletes control. Example CheckboxCombo, 2D array.au3: ;#include <Array.au3> #include <GUIConstantsEx.au3> #include "..\Includes\CheckboxCombo.au3" Example() Func Example() ; Create GUI GUICreate( "Checkbox Combo", 220, 244 ) ; Combo items Local $aItems = [ [ "Item0" ], _ [ "Item1" ], _ [ "Item2", 1 ], _ ; Item2 is checked [ "Item3" ], _ [ "Item4", 1 ], _ ; Item4 is checked [ "Item5" ], _ [ "Item6", 1 ], _ ; Item6 is checked [ "Item7" ], _ [ "Item8" ], _ [ "Item9" ] ] ; Create Checkbox Combo Local $idComboBox = CheckboxCombo_Create( 10, 10, 200, 20, 10, $aItems ) ; Show GUI GUISetState() ; Message loop While 1 Switch GUIGetMsg() Case $idComboBox ConsoleWrite( "Checked items: " & CheckboxCombo_GetChecked( $idComboBox ) & @CRLF ) ;Local $aChecked = CheckboxCombo_GetChecked( $idComboBox, 1 ) ;_ArrayDisplay( $aChecked ) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup GUIDelete() EndFunc Zip-file You need AutoIt 3.3.12 or later. Tested on Windows 7 and Windows 10. Comments are welcome. Let me know if there are any issues. CheckboxCombo.7z1 point
-
Skysnake, You need to remove the $WS_HSCROLL style from the control styles - the $ES_AUTOHSCROLL merely allows the control to automatically scroll as you type. This is why the final snippet works and the others do not, as you only remove the correct style in that final one - in the first 2 the edit control is created with the $WS_HSCROLL as a default style as explained in the Help file. This works for me: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) ; Create edit without the $WS_HSCROLL style $cEdit = GUICtrlCreateEdit("", 10, 10, 200, 200, Bitor($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M231 point
-
How do I...do zero padding on a value
boomingranny reacted to Melba23 for a topic
robcull, You should have seen that page before I rewrote it! Seriously, if you want to provide something that you think is better we would be happy to consider replacing the current content. M231 point -
How do I...do zero padding on a value
boomingranny reacted to robcull for a topic
No it doesn't. Look: ConsoleWrite(@CRLF&"_ZeroPad(3,1) = "& _ZeroPad(3,1) ) ConsoleWrite(@CRLF&"_ZeroPad(3,10) = "& _ZeroPad(3,10) ) ConsoleWrite(@CRLF&"_ZeroPad(3,10) = "& _ZeroPad(3,100) ) ConsoleWrite(@CRLF) ConsoleWrite(@CRLF&"_ZeroPadII(3,1) = "& _ZeroPadII(3,1) ) ConsoleWrite(@CRLF&"_ZeroPadII(3,10) = "& _ZeroPadII(3,10) ) ConsoleWrite(@CRLF&"_ZeroPadII(3,10) = "& _ZeroPadII(3,100) ) ConsoleWrite(@CRLF&@CRLF) Func _ZeroPad($a, $b) ;OP's code from post #2 $c = $a - StringLen($b) if $c > 0 Then for $d = $c to $a $b = "0" & $b Next EndIf return $b EndFunc Func _ZeroPadII($n, $X) ;my version while stringlen($X)<$n $X = "0" & $X wend return $X EndFunc Returns: _ZeroPad(3,1) = 001 _ZeroPad(3,10) = 00010 _ZeroPad(3,10) = 100 _ZeroPadII(3,1) = 001 _ZeroPadII(3,10) = 010 _ZeroPadII(3,10) = 100 EDIT: It just occurred to me that you were referring to the stringformat code in the actual second post, not the second post by the OP. Haha oops. yes, stringformat is great, i just wonder why they've never gotten around to updating the help file on it. It's very difficult to decipher for beginners, and the example provided leaves a lot to be wanting. I mean hell, the variable format is "%[flags] [width] [.precision] type" and yet the info on each of those parameters is written in the file in the order "width, type, flags, and finally precision."1 point -
Well, you can compile it manually, however you'll still need to compile your script to A3X. 1. Get any already compiled AutoIt script (in .exe), no matter what it is (it can even be a hello world) 2. Compile your desired script to A3X. 3. Open A3X with Notepad(++) and your exe file with Resource Hacker 4. In Resource Hacker, replace the content of RCDATA\SCRIPT with the A3X file contents. That's all. 5. Come back and answer why AU3 is forbidden on your environment1 point
-
RaySS, You do like making the simple complex: #include <FileConstants.au3> #include <MsgBoxConstants.au3> ; Create file in same folder as script $sFileName = @ScriptDir &"\Test.txt" ; Open file - deleting any existing content $hFilehandle = FileOpen($sFileName, $FO_OVERWRITE) ; Prove it exists If FileExists($sFileName) Then MsgBox($MB_SYSTEMMODAL, "File", "Exists") Else MsgBox($MB_SYSTEMMODAL, "File", "Does not exist") EndIf ; Write a line FileWrite($hFilehandle, "This is line 1") ; Read it MsgBox($MB_SYSTEMMODAL, "File Content", FileRead($sFileName)) ; Append a line FileWrite($hFilehandle, @CRLF & "Thisi is line 2") ; read it MsgBox($MB_SYSTEMMODAL, "File Content", FileRead($sFileName)) ; Close the file handle FileClose($hFilehandle) ; Tidy up by deleting the file FileDelete($sFileName)M231 point
-
10,310 downloads
Previous downloads = 1,000 +/- Protect and get Paid for.... Your Program Features: End user must register. Automated email notifications to developer. Trial period. User license. Registration price. Registration reminder. Automated registration and acceptance of payment. ( your paypal account ) Limited Freeware Option ...Valuater 8)1 point -
Ignore mouse/keyboard input
Rott reacted to jvanegmond for a topic
This has not been mentioned before: Run("taskmgr","", @SW_DISABLE)1 point