Leaderboard
Popular Content
Showing content with the highest reputation on 06/11/2015 in all areas
-
Hi, A number of recent threads have degenerated into discussions between no doubt well-meaning members over the legality of the question asked - such spats are both unseemly and unnecessary. If you have not already noticed, there is a Moderation team charged by the site owner with keeping the site running smoothly in accordance with his wishes - so please leave the decisions to them. If the question is obviously illegal, then perhaps the first responder might point at the Forum rules as well as reporting the thread so that normal moderation action can be taken. But if there is any doubt, please still report the thread, but do NOT get involved in pointless discussions as to whether or not it is allowable - the Moderation team will make the final decision and will not be swayed by any other opinions, so save the wear on typing fingers and keyboards. In particular, if a Moderation team member has already posted permitting the thread to continue, it is completely out of order for a third party to post again questioning the decision - from now on this will be regarded as an unfriendly act and is likely to attract sanctions upon the wannabee-Mod. If there is really a burning need to discuss the matter further, please do so by PM - the Moderation team do not bite and are open to reasoned debate. M232 points
-
1 point
-
faustf, So does it work correctly now? M231 point
-
faustf, Did you actually read the code I posted above? My example code has these lines: $Combo1 = GUICtrlCreateCombo("", 344, 368, 225, 25);, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetOnEvent($Combo1, "_func_categorie_combo")so that the function which sets the data in $combo2 is called each time $combo1 is actioned. All you do in the script you just posted is call that function once at the end of the _Gui function - no wonder the data never changes as you never react to any changes in $combo1. M231 point
-
​Glad I managed to get to Rome somehow. And I did realize that I could simply replace Return with Exit after I looked your post from last year. Much obliged, Exit.1 point
-
Pro tip: you don't need to quote the doublequote if you use single quotes to formulate your string. Run(@ComSpec & ' /k ""' & @ScriptDir & '\Calibre\ebook-meta.exe" "' & $Path & '" --title "TEST és book" --authors "some body""')Don't know why I didn't think of that hours ago, it obviously makes this a lot simpler1 point
-
Think I got it, after some googling. It's weird how cmd works with quoting its parameters. Try this: Run(@ComSpec & " /k """"" & @ScriptDir & "\Calibre\ebook-meta.exe"" ""c:\test folder\test.mobi"" --title TESTbook --authors somebody""""")Yes, all those quotes are necessary. I downloaded the program and tried it out myself. My actual command was: C:\tmp>cmd /c ""c:\Program Files\Calibre2\ebook-meta.exe" "c:\tmp\test dir\test file.mobi" --title TESTbook3 --authors somebody2"" Hope I converted it to your paths correctly1 point
-
I understand, but quoting the argument like that should be the solution to that problem.1 point
-
WMI ScriptOMatic tool for AutoIt
argumentum reacted to UEZ for a topic
I like the progress on this project - well done! Thanks for sharing!1 point -
WMI ScriptOMatic tool for AutoIt
UEZ reacted to argumentum for a topic
update for 2015.06.11 added a "nice" COM error handler ( in Autoit v3.2 if there is a COM error it'll tell you and no more run, in v3.3 it will let it slide but you don't realize there was one. So I put together a COM error handler that will gather all the errors and show'em to you in an array displayed by _ArrayDisplay. It includes the line number and the line of code it self. nice. ) added the Scite lexer. ( There are code generated that is over 6000 lines long and that is a bit too much for the edit control, so, I decided that since is gonna run in a PC that most likely is to have ScITE, using the DLL just makes sense. Everything that is needed is taken from your installation, colors, fonts, etc. In case that ScITE is not there, then, the edit control would be used. ) updated file in the files section.1 point -
How to grab data from website
Tripoz reacted to AspirinJunkie for a topic
The site continuously reads out the value from a text-stream and display it on the site. So it should be more efficient if you read out the stream directly. A suggestion (you will need >>WinHTTP.au3<<): #include <WinHTTP.au3> Global Const $LineOffset = @ScriptLineNumber - 1 Global $hSession = _WinHttpOpen() Global $hConnect = _WinHttpConnect($hSession, "www.binary.com", 443) If @error Then _Error("Error in _WinHttpConnect", $hConnect) $hRequest = _WinHttpSimpleSendSSLRequest($hConnect, 'GET', '/push/price/T_CALL_R-50_5t_S0P_c_USD_EN') If @error Then _Error("Error in _WinHttpSimpleSendSSLRequest", $hRequest) _WinHttpReceiveResponse($hRequest) While 1 If _WinHttpQueryDataAvailable($hRequest) Then $s_Response = _WinHttpReadData($hRequest, 0, @extended) If @error Then ExitLoop ConsoleWrite(StringRegExp($s_Response, 'spot":"(\d+\.\d+)', 1)[0] & @CRLF) EndIf If @error Then ExitLoop Sleep(100) WEnd _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hSession) Func _Error(Const $s_Text, Const $Ret = Default, Const $b_Exit = True, Const $Error = @error, Const $Extended = @extended, Const $ScriptLine = @ScriptLineNumber) Local $s_Out = '"' & $s_Text & '"' & @CRLF & @CRLF & "Line: " & $ScriptLine - $LineOffset & @CRLF & "@error: " & $Error & @CRLF & "@extended: " & $Extended & ($Ret = Default ? "" : @CRLF & "Return value: " & $Ret) MsgBox(48, "Error", $s_Out) If $b_Exit Then Exit EndFunc1 point -
faustf, I would do it like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 600, 500) $Combo1 = GUICtrlCreateCombo("", 344, 368, 225, 25);, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) $Label4 = GUICtrlCreateLabel("Categoria", 344, 344, 49, 17) GUICtrlSetData($Combo1, "Abbigliamento e Accessori|Animali e Accessori|Arredamento e Casalinghi|Attrezzature da Lavoro|Biglietti|Case|Case Vacanze e Viaggi|Corsi e Lezioni|Elettronica|Gastronomia|Lavoro|Libri Film Musica|Motori|per il tuo Matrimonio|Sport|Tempo Libero|Per Bambini", "") ;$Button1 = GUICtrlCreateButton("Conferma", 576, 368, 59, 21) $Label5 = GUICtrlCreateLabel("Sottocategoria", 344, 400, 73, 17) GUICtrlSetState($Label5, $GUI_HIDE) $Combo2 = GUICtrlCreateCombo("", 344, 424, 225, 25) GUICtrlSetState($Combo2, $GUI_HIDE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Combo1 GUICtrlSetState($Combo2, $GUI_SHOW) GUICtrlSetState($Label5, $GUI_SHOW) $categoria = GUICtrlRead($Combo1) Switch $categoria Case $categoria = "Elettronica" GUICtrlSetData($Combo2, "|Altro Elettronica|Audio TV e Video|Cellulari e Accessori|Computer e Software|fotografia|Tablet|videogiochi e Console","") EndSwitch EndSwitch WEndNote the leading "|" in the data added to $combo2 - this ensures that it replaces any current content so that you only get the required items displayed when you change the selection in $combo1. M231 point
-
don't know the overall logic and the purpose of your program, anyway maybe something like this could be a start #include <ButtonConstants.au3> #include <MsgBoxConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> $Span = ConnectWebPage() ; get reference to "Span" Local $RefreshRate = 1000 ; 1000 ms = refresh any 1 second Local $Timer = TimerInit() ; Initialize timer #region ### START Koda GUI section ### Form=C:\Users\Marcellino\Downloads\koda_1.7.3.0\Forms\project Pakdhe.kxf $Form1 = GUICreate("Macro Martandang's Methode v.1", 349, 280, 192, 124) $Group1 = GUICtrlCreateGroup(" Random Market ", 176, 48, 161, 49) $Random = GUICtrlCreateCombo("R.100", 184, 64, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "R.25|R.50|R.75|R.Bear|R.Bull|R.Yang|R.Yin") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup(" Method ", 8, 8, 161, 137) $Radio_Ujung = GUICtrlCreateRadio("Metode Ujung", 24, 56, 113, 17) $Radio_Locking = GUICtrlCreateRadio("Metode Locking", 24, 32, 113, 17) $Radio_Lambung = GUICtrlCreateRadio("Metode Lambung", 24, 80, 113, 17) GUICtrlSetState($Radio_Lambung, $GUI_CHECKED) $Radio_Cantik = GUICtrlCreateRadio("Metode Cantik", 24, 104, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group3 = GUICtrlCreateGroup(" Stake ", 176, 96, 161, 49) $Label1 = GUICtrlCreateLabel("Stake :", 184, 116, 38, 17) $InputStake = GUICtrlCreateInput("5", 228, 112, 73, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER)) $Label2 = GUICtrlCreateLabel("$", 311, 116, 10, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group4 = GUICtrlCreateGroup(" Martingale ", 176, 8, 161, 41) $Radio5 = GUICtrlCreateRadio("YES", 192, 24, 41, 17) $Radio6 = GUICtrlCreateRadio("NO", 290, 24, 41, 17) GUICtrlSetState($Radio6, $GUI_CHECKED) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group5 = GUICtrlCreateGroup(" Barrier ", 8, 152, 329, 49) $Label3 = GUICtrlCreateLabel("High Barrier :", 16, 173, 65, 17) $Label4 = GUICtrlCreateLabel("Low Barrier :", 190, 173, 63, 17) $Input2 = GUICtrlCreateInput("-1.30000", 256, 168, 65, 21) $Input1 = GUICtrlCreateInput("+1.30000", 82, 168, 73, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group5 = GUICtrlCreateGroup(" SPOT PRICE ", 8, 202, 329, 39) $Label4 = GUICtrlCreateLabel("SPOT :", 96, 220, 65, 17) $Label5 = GUICtrlCreateLabel("", 146, 220, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("&RUN", 8, 248, 99, 25) $Button2 = GUICtrlCreateButton("STOP", 120, 248, 107, 25) $Button3 = GUICtrlCreateButton("EXIT", 240, 248, 99, 25) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### $Timer = TimerInit() While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE ExitLoop Case $idMsg = $Button3 ExitLoop Case $idMsg = $Radio_Ujung ;Radioujung() If GUICtrlRead($Radio_Ujung) = $GUI_CHECKED Then GUICtrlSetState($Input1, $GUI_DISABLE) EndIf Case $idMsg = $Radio_Cantik If GUICtrlRead($Radio_Cantik) = $GUI_CHECKED Then GUICtrlSetState($Input1, $GUI_ENABLE) EndIf EndSelect If TimerDiff($Timer) > $RefreshRate Then ; refresh only at refresh rate spot($Label5, $Span) ; Set Span value to $Label5 $Timer = TimerInit() ; reset timer EndIf WEnd Func Radioujung() If GUICtrlRead($Radio_Ujung) = $GUI_CHECKED Then GUICtrlSetState($Input1, $GUI_DISABLE) GUICtrlSetState($Input2, $GUI_DISABLE) Else GUICtrlSetState($Input1, $GUI_ENABLE) GUICtrlSetState($Input2, $GUI_ENABLE) EndIf EndFunc ;==>Radioujung Func Spot($hLabel, $Span) GUICtrlSetData($hLabel, $Span.InnerHTML) EndFunc ;==>Spot Func ConnectWebPage() $oIE = _IECreate('https://www.binary.com/c/trade.cgi?market=random&time=5t&form_name=risefall&expiry_type=duration&amount_type=stake&H=S0P¤cy=USD&underlying_symbol=R_50&amount=1&date_start=now&type=CALL&l=EN') Local $Span Do $Span = _IEGetObjById($oIE, "spot") Until IsObj($Span) ; wait till the "spot" object exists on the page Return $Span EndFunc ;==>ConnectWebPage1 point
-
Xp Style Skin
argumentum reacted to Lakes for a topic
I use this skin for my Win7 desktop (with classic shell for start menu), there is a skin builder here1 point -
AutoIt Eye Clock v1.3.1 build 2015-06-28
argumentum reacted to UEZ for a topic
Update to Eye Clock v1.2.0 build 2015-06-10 Acually I didn't want to continue this project but I had still ideas that I wanted to implement like eye glasseyebrowsmore pupil effectsI hope you will like it. When I open the settins window sometimes not all controls will be drawn. Any idea why this happens?1 point -
I added some comments to show what I did: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> ;#include <MsgBoxConstants.au3> AutoItSetOption("SendKeyDelay", 50) ;Opt("SendKeyDelay", 5) Global $iCount, $InputCatNo While 1 _Animal() Run("notepad.exe") WinWaitActive("Untitled - Notepad") If $iCount <> "" Then Send($iCount & "{ENTER}") ExitLoop WEnd Func _Animal() $aAnimal = GUICreate("Animals", 342, 273, 509, 166) $CBcCats = GUICtrlCreateCheckbox("Cats?", 115, 25, 97, 25) $LblCat = GUICtrlCreateLabel("Number of Cats", 32, 54, 113, 23, $SS_RIGHT) GUICtrlSetState($LblCat, $GUI_DISABLE) $InputCatNo = GUICtrlCreateInput("", 152, 54, 137, 23, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER)) GUICtrlSetState($InputCatNo, $GUI_DISABLE) $BTNGo = GUICtrlCreateButton("GO", 104, 176, 97, 57) GUISetState(@SW_SHOW) $msg = 0 While 1 $msg = GUIGetMsg() Select Case $msg = $BTNGo $iCount = GUICtrlRead($InputCatNo) ; read the input If $iCount Then ; if we have something in the box $iCount = $iCount ; set the count Else $iCount = "" ; if there is nothing, then set $iCount to nothing EndIf ContinueLoop ; keep going in the loop Case $msg = $GUI_EVENT_CLOSE ; we need to make sure we are accounting for the red "x" $iCount = "" ; set the count to nothing, since we did not want to go ExitLoop ; exit the entire loop EndSelect Switch $msg Case $CBcCats If GUICtrlRead($CBcCats) = $GUI_CHECKED Then GUICtrlSetState($LblCat, $GUI_ENABLE) GUICtrlSetState($InputCatNo, $GUI_ENABLE) ElseIf GUICtrlRead($CBcCats) = $GUI_UNCHECKED Then GUICtrlSetState($LblCat, $GUI_DISABLE) GUICtrlSetState($InputCatNo, $GUI_DISABLE) EndIf EndSwitch WEnd Select Case $msg = $BTNGo GUISetState(@SW_HIDE) EndSelect EndFunc ;==>_AnimalGlad to help.1 point
-
stealth, I can only see one checkbox - but if you mean the input then something like this should work: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> _Animal() Func _Animal() $aAnimal = GUICreate("Animals", 342, 273, 509, 166) $CBcCats = GUICtrlCreateCheckbox("Cats?", 115, 25, 97, 25) $LblCat = GUICtrlCreateLabel("Number of Cats", 32, 54, 113, 23, $SS_RIGHT) GUICtrlSetState($LblCat, $GUI_DISABLE) $InputCatNo = GUICtrlCreateInput("", 152, 54, 137, 23, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER)) GUICtrlSetState($InputCatNo, $GUI_DISABLE) $BTNGo = GUICtrlCreateButton("GO", 104, 176, 97, 57) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($aAnimal) Return Case $BTNGo $iCount = GUICtrlRead($InputCatNo) If $iCount Then MsgBox($MB_SYSTEMMODAL, "Cats required", $iCount) Else MsgBox($MB_SYSTEMMODAL, "Oh dear", " No cats required") EndIf Case $CBcCats If GUICtrlRead($CBcCats) = $GUI_CHECKED Then GUICtrlSetState($LblCat, $GUI_ENABLE) GUICtrlSetState($InputCatNo, $GUI_ENABLE) Else GUICtrlSetState($LblCat, $GUI_DISABLE) GUICtrlSetState($InputCatNo, $GUI_DISABLE) EndIf EndSwitch WEnd EndFunc ;==>_Animal M231 point
-
for my self i prefer this code: Global Const $VK_NUMLOCK = 0x90 Global Const $VK_SCROLL = 0x91 Global Const $VK_CAPITAL = 0x14 Func _LockKeyGetState($KeyHex) Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$KeyHex) Return $ret[0] EndFunc e. g. numlock: _LockKeyGetState($VK_NUMLOCK) or _LockKeyGetState(0x90) It will return 1 if activated and 0 if not1 point