Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. @guinness Its would be useful when an UDF wants to call another UDF (Register a function to call on an event) TD
  2. @Melba23 Nope, Like this: Local $aParameters[4] = [0, "String", 1, 1.2, True] Call("SomeFunc", $aParameters) Func SomeFunc($sString, $iInteger, $fFloat, $bBoolen) ; Some code Return EndFunc
  3. Hello Everyone , I want to propose a new feature for the Call function: I think it would be better if Call function can accept an array for the parameters of the function to call instead of n number of parameters because it will allow UDFs to call a function with a dynamic number of parameters like this: Here is the Trac Link TD
  4. @Chimaera http://pho.to/9fj9I
  5. Try using @OSBuild instead of @OSVersion Case $T2WinUpdatesButton If $OS = 'V-' Then ShellExecuteWait('wuauclt.exe') ; XP WinUpdates Sleep(20) Else If Case $T2WinUpdatesButton If $OS = 'V-' Then ShellExecuteWait('wuauclt.exe') ; XP WinUpdates Sleep(20) Else If @OSBuild >= 1234 Then Run('ms-settings:windowsupdate') ; Windows 10 Else ShellExecuteWait('wuapp.exe') ; Vista up to 8.1 Sleep(20) EndIf EndIf Func _OsDetect() Local $OS = 'V+' If @OSVersion = 'WIN_2000' Or @OSVersion = 'WIN_2003' Or @OSVersion = 'WIN_XP' Or @OSVersion = 'WIN_XPe' Then $OS = 'V-' EndIf ;~ ConsoleWrite($OS & @CRLF) Return $OS EndFunc ;==>_OsDetect = 'WIN_10' Then Run('ms-settings:windowsupdate') ; Windows 10 Else ShellExecuteWait('wuapp.exe') ; Vista up to 8.1 Sleep(20) EndIf EndIf Func _OsDetect() Local $OS = 'V+' If @OSVersion = 'WIN_2000' Or @OSVersion = 'WIN_2003' Or @OSVersion = 'WIN_XP' Or @OSVersion = 'WIN_XPe' Then $OS = 'V-' EndIf ;~ ConsoleWrite($OS & @CRLF) Return $OS EndFunc ;==>_OsDetectRemember to replace 1234 with the build no. of Windows 10, TD
  6. @Surya Do you want to join the Doc team ? If yes, ask @minxomat, he is our leader
  7. Hey Bro! Same country, similar age . Nice UDF
    5 Stars, Please submit your reviews too P.S Feel free to vote 3 stars
    Awesome Book! Worth reading if you have 0 experience in programming! Keep up the good work jfish!
  8. Thanks @slidy56fr! Unfortunately, no such project exist... and never will be , See the Not To Do List of AutoIt. As Manadar pointed out, AutoIt hugely depends on the Windows APIs, Porting AutoIt to other OSes would require complete rewrite form scratch TD
  9. Just make sure that the AV does not kill your script while its doing its job
  10. Neither can I because of the german comments & cluttered code P.S whats up with the undotted ı?
  11. Good work @guinness , I was gonna make my own version of this UDF, Good-thing that I used google after using the forum search!
  12. @guinness Thanks! Updated
  13. Declare $hFileOpen outside of the while loop, It should look like this: #include <GUIConstants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=g:\ai\autoit3\scite\forms\test2.kxf $Form1_1 = GUICreate("Test_Form_1", 958, 321, 192, 133, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_TABSTOP)) GUISetBkColor(0xC0DCC0) ;The 3 Inputboxes $inputbox1 = GUICtrlCreateInput("Inputbox1", 536, 50, 400, 21) $inputbox2 = GUICtrlCreateInput("Inputbox2", 536, 120, 400, 21) $inputbox3 = GUICtrlCreateInput("Inputbox3", 536, 190, 400, 21) ;The 2 txt fields relating to inputbox1 $InputBox1_Label1 = GUICtrlCreateLabel("Inputbox1 text field to the left:", 80, 50, 448, 30, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) $InputBox1_Label2 = GUICtrlCreateLabel("inputbox1 text field above", 536, 20, 400, 30, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) ;The 2 txt fields relating to inputbox2 $inputbox2_Label1 = GUICtrlCreateLabel("inputbox2 text field to the left:", 80, 120, 448, 30, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) $inputbox2_Label2 = GUICtrlCreateLabel("inputbox2 text field above", 537, 90, 400, 30, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800080) ;The 2 txt fields relating to inputbox3 $inputbox3_Label1 = GUICtrlCreateLabel("inputbox3 text field to the left:", 80, 190, 448, 30, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) $inputbox3_Label2 = GUICtrlCreateLabel("inputbox3 text field above", 536, 160, 400, 30, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) ;Submit button $Button1 = GUICtrlCreateButton("Submit", 48, 248, 161, 49) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x3A6EA5) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### local const $sPath = ("F:\Test\"&@MON) local const $sFilnavn = (@UserName&".txt") local const $sFilPath = ($sPath&"\"&$sFilnavn) DirCreate($sPath) Local $hFileOpen = FileOpen($sFilPath, $FO_APPEND) If $hFileOpen = -1 Then ; Your code here EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $button1 $inputcontents1=GUICtrlRead($inputbox1) $inputcontents2=GUICtrlRead($inputbox2) $inputcontents3=GUICtrlRead($inputbox3) FileWrite($hFileOpen,"input1 "&$inputcontents1&@CRLF) Filewrite($hFileOpen,"input2 "&$inputcontents2&@CRLF) Filewrite($hFileOpen,"input3 "&$inputcontents3&@CRLF) GUICtrlSetData($inputbox1,"1") GUICtrlSetData($inputbox2,"2") GUICtrlSetData($inputbox3,"3") Case $GUI_EVENT_CLOSE FileClose($hFileOpen) Exit EndSwitch WEndTD
  14. TheDcoder

    python

    Glad that I was a help
  15. TheDcoder

    python

    @Renderer You need to download the termcolor module, You will find the download link in post #2
  16. @MHz Strange, it works for me now :-/
  17. @gruntydatsun It will work fine on older versions of windows, i.e < Windows 7, see the link which clicked posted
  18. @powaful3000 No, its not a virus, here is some reading for you, TD
  19. What function are you using to download files?
×
×
  • Create New...