Jump to content

Giordano

Active Members
  • Posts

    36
  • Joined

  • Last visited

About Giordano

  • Birthday 02/09/1988

Profile Information

  • Location
    Roma

Giordano's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Ehehehe thanks melba! Yes, this was exactly what i don't wanted to hear! But thanks for the obfuscador, i will try with it! Have a nice day and thanks for the fast raply!
  2. Hi there! Sorry for my bad english! I have a doubt about autoit3: If i compile my script into an .exe, is there a way with someone can decompile and retrieve my code? Thanks
  3. <input type="search" results="5" placeholder="Search" autosave="vaadin.com" name="q" id="query"> (I THINK THIS IS THE ZOEKEN BUTTON U NEED) if you need to find this one: $oForms = _IETagNameGetCollection($oIE,"form") For $oForm in $oForms If String($oForm.id) = "search" Then $oFormObj = $oForm ExitLoop EndIf Next ;now i found the search form! ;now search for the input in this form... $oInputs = _IETagNameGetCollection($oIE,"input") For $oInput in $oInputs If String($oInput.id) = "query" Then $oSearchInput = $oInput ExitLoop EndIf Next ;now i have the form and i have the input of the research! _IEFormElementSetValue($oSearchInput,"hello") Sleep(2000) _IEFormSubmit($oFormObj)
  4. Good Thomas! the same thing: $oDivs = _Ietagnamegetcollection($oIE,"div") For $oDiv in $oDivs if string($oDiv.id) = "p_p_id_dtghsppdataentry_WAR_dtghsppdataentryportlet_" then consolewrite(String($oDiv.innertext)) exitloop endif next $oDiv.id = ID $oDiv.innertext = inner text $oDiv.innerhtml = inner html $oDiv.classname = class these are the most sub tag that you can use to find what you want!
  5. Try FireBug plugin in mozilla firefox to catch the code for what you are looking for, and use IE.au3 to automatize it!
  6. Hi thomas! Try this one: #include<IE.au3> $oIE = _IECreate("http://vaadin.com/home") $oLis = _IETagNameGetCollection($oIE,"li") For $oLi in $oLis If String($oLi.id) = "nav_Download" Then ;found the Download LI tag in html! $oLink = _IETagNameGetCollection($oLi,"a",0) ;take the first link in the LI tag! _IEAction($oLink,"click") ;click on the download page! _IELoadWait($oIE) ;wait for IE status LOADED ExitLoop EndIf Next Regards Giordano
  7. Thank you for the reply, but i think this won't work for my kind of functions to launch... This is true, infact i don't need to run simultaneous function for the same account! (the account has to do different functions with different runtimes, but the next function can start, without problems, when the actual function finish his work! But in same time, i need to follow the clock for the 2nd account! Like a NEW ISTANCE of the .EXE launch (with different account ID parameter) if it is impossible to do, i could remove the multiaccount in my program and let the user launch more than 1 time the same program changing the user ID associated.. So i will have 2 different processess and all be ok.. But i was wondering to do it with the same MAIN program! Sorry for my bad english Giordano
  8. I will explain the problem: I have to create a GUI in this GUI i can add some accounts (max 3 for example) every account has a list of actions to do like this: ACCOUNT 1 = timestamp of start:Function1()|timestamp of start:Function2() ACCOUNT 2 = timestamp of start:Function1()|timestamp of start:Function2() #include<Array.au3> $ActionsAccount1 = String(_TimeGetStamp()+20)&":funcA()|"&String(_TimeGetStamp()+50)&":funcB()" $ActionsAccount2 = String(_TimeGetStamp()+20)&":funcC()|"&String(_TimeGetStamp()+50)&":funcA()" While 1 $ActualTimeStamp = _TimeGetStamp() ConsoleWrite("$ActualTimeStamp&@CRLF"]$ActualTimeStamp&@CRLF) ConsoleWrite("$ActionsAccount1&@CRLF"]$ActionsAccount1&@CRLF) $Actions1 = StringSplit($ActionsAccount1,"|") For $i = 1 To $Actions1[0] $Act1 = StringSplit($Actions1[$i],":") $Time = int($Act1[1]) $FuncToDo = $Act1[2] If $Time <= $ActualTimeStamp Then Switch($FuncToDo) Case "funcA()" funcA() Case "funcB()" funcB() Case "funcC()" funcC() EndSwitch _ArrayDelete($Actions1,$i) ExitLoop EndIf Next _ArrayDelete($Actions1,0) $ActionsAccount1 = _ArrayToString($Actions1,"|") If $ActionsAccount1 = "" Then ConsoleWrite("Work Finished! See you later.."[email="&@CRLF"]&@CRLF[/email]) Exit EndIf Sleep(1000) WEnd Func funcA() For $i=1 To 10 ConsoleWrite("Hello, i'm funcA!"[email="&@CRLF"]&@CRLF[/email]) Sleep(1000) Next EndFunc Func funcB() For $i=1 To 20 ConsoleWrite("Hello, i'm funcB!"[email="&@CRLF"]&@CRLF[/email]) Sleep(1500) Next EndFunc Func funcC() For $i=1 To 15 ConsoleWrite("Hello, i'm funcC!"[email="&@CRLF"]&@CRLF[/email]) Sleep(500) Next EndFunc Func _TimeGetStamp() Local $av_Time $av_Time = DllCall('CrtDll.dll', 'long:cdecl', 'time', 'ptr', 0) If @error Then SetError(99) Return False EndIf Return $av_Time[0] EndFunc This code can elaborate a single list of functions to do.... Is there a function that can elaborate 2 different while wend loops simultanely (so a Loop will do actions related for $ActionsAccount1 and the other loop will do $ActionsAccount2)? EDIT: CODE FIXED TIMING! Thanks Giordano[Rome,IT]
  9. This could be useful for who is looking for the same thing: -ADDED control of the last clicked item! So it write the ID only when the selection change! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> ; Set flag $fFlag = False ; Create GUI $hGUI = GUICreate("Test", 500, 500) $hTreeView = _GUICtrlTreeView_Create($hGUI, 10, 10, 200, 300, BitOR($TVS_HASLINES, $TVS_LINESATROOT, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) GUISetState() ; Fill Treeview _GUICtrlTreeView_BeginUpdate($hTreeView) $iOverview = _GUICtrlTreeView_Add($hTreeView, 0, "Overview") _GUICtrlTreeView_SetItemParam($hTreeView, $iOverview, 0) For $i = 1 To 15 $iHello = _GUICtrlTreeView_AddChild($hTreeView, $iOverview, $i) _GUICtrlTreeView_SetItemParam($hTreeView, $iHello, $i) Next _GUICtrlTreeView_EndUpdate($hTreeView) _GUICtrlTreeView_Expand($hTreeView) ; Register message GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") $LastClicked = _GUICtrlTreeView_GetItemParam ($hTreeView, _GUICtrlTreeView_GetSelection($hTreeView)) ; Loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch ; If flag is set If $fFlag Then ; Clear flag $fFlag = False If $LastClicked <> _GUICtrlTreeView_GetItemParam ($hTreeView, _GUICtrlTreeView_GetSelection($hTreeView)) Then ; Read and display the parameter ConsoleWrite(_GUICtrlTreeView_GetItemParam ($hTreeView, _GUICtrlTreeView_GetSelection($hTreeView)) & @CRLF) EndIf EndIf WEnd ; Intercept the NOTIFY leassages Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam ; Read the data Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") ; See if it was out treeview and the required code Switch $hWndFrom Case $hTreeview Switch $iCode Case $NM_CLICK ; The user has clicked the left mouse button within the control so set the flag $fFlag = True $LastClicked = _GUICtrlTreeView_GetItemParam ($hTreeView, _GUICtrlTreeView_GetSelection($hTreeView)) ;ADDED Return 0 EndSwitch EndSwitch EndFunc
  10. Thank so much! You solved me 2 problems: The problem posted and the GuiRegisterMsg for what i was looking for! I like so much that function, i want to learn all of it (GuiRegisterMsg) I was almost arrived to the same solution but i was missing this tutorial! Thank you so much from italy!
  11. Hello! I speak english just a little, i'm learning AutoIt code! Here the code: #include <GUIConstantsEx.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 413, 300, 249, 148) $TreeView = GUICtrlCreateTreeView(56, 40, 209, 209) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $config="set.ini" ;~ POPOLATING INIFILE IniWrite($config,"Accounts","IDs","1,2,3") $IDAccounts = StringSplit(IniRead($config,"Accounts","IDs",""),",") For $i=1 to $IDAccounts[0] IniWrite($config,$i,"ID",$i) IniWrite($config,$i,"Name",$i&" name") IniWrite($config,$i,"Surname",$i&" surname") Next PopolateTreeviewDinamically() While 1 ;~ This run the NotifiIT() function each 3 seconds! NotifyIT() Sleep(3000) ;~ But i need to run the function NotifiIT() only when selection changes.. Please help me! $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func PopolateTreeviewDinamically() $Overview = _GUICtrlTreeView_Add($TreeView,0,"Overview") _GUICtrlTreeView_SetItemParam($TreeView,$Overview,0) $IDs = IniRead($config,"Accounts","IDs","") If $IDs <> "" Then $IDs = StringSplit($IDs,",") _GUICtrlTreeView_BeginUpdate($TreeView) For $i = 1 to $IDs[0] $ID = int(IniRead($config,$IDs[$i],"ID",0)) $Name = IniRead($config,$IDs[$i],"Name","ERRORE!") $Surname = IniRead($config,$IDs[$i],"Surname","ERRORE!") $Hello = _GUICtrlTreeView_AddChild($TreeView,$Overview,$Name) _GUICtrlTreeView_SetItemParam($TreeView,$Hello,$ID) Next _GUICtrlTreeView_EndUpdate($TreeView) _GUICtrlTreeView_Expand($TreeView) EndIf EndFunc Func NotifyIT() $ID = _GUICtrlTreeView_GetItemParam($TreeView) Msgbox(0,"Name",$ID) EndFunc Is there a method to: onselect item of the treeview msgbox for item param? Thank you so much for tring help me!
  12. this is cool i made what i was trying to do! $Elementi = "ABC" $NumElem = StringLen($Elementi) $ArrayElementi = StringSplit($Elementi,"") For $Posti = 1 To 8 Switch $Posti Case 1 For $q=1 To $NumElem $string = $ArrayElementi[$q] Funzione() Next Case 2 For $q=1 To $NumElem For $w=1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w] Funzione() Next Next Case 3 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e] Funzione() Next Next Next Case 4 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem For $r = 1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e]&$ArrayElementi[$r] Funzione() Next Next Next Next Case 5 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem For $r = 1 To $NumElem For $t = 1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e]&$ArrayElementi[$r]&$ArrayElementi[$t] Funzione() Next Next Next Next Next Case 6 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem For $r = 1 To $NumElem For $t = 1 To $NumElem For $y = 1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e]&$ArrayElementi[$r]&$ArrayElementi[$t]&$ArrayElementi[$y] Funzione() Next Next Next Next Next Next Case 7 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem For $r = 1 To $NumElem For $t = 1 To $NumElem For $y = 1 To $NumElem For $u = 1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e]&$ArrayElementi[$r]&$ArrayElementi[$t]&$ArrayElementi[$y]&$ArrayElementi[$u] Funzione() Next Next Next Next Next Next Next Case 8 For $q=1 To $NumElem For $w=1 To $NumElem For $e=1 To $NumElem For $r = 1 To $NumElem For $t = 1 To $NumElem For $y = 3 To $NumElem For $u = 1 To $NumElem For $i = 1 To $NumElem $string = $ArrayElementi[$q]&$ArrayElementi[$w]&$ArrayElementi[$e]&$ArrayElementi[$r]&$ArrayElementi[$t]&$ArrayElementi[$y]&$ArrayElementi[$u]&$ArrayElementi[$i] Funzione() Next Next Next Next Next Next Next Next EndSwitch Next Func Funzione() ToolTip($string) EndFunc
  13. OK THIS IS A GOOD START: #include<string.au3> #include<math.au3> $Elementi = "ABCDEF" $NumElem = StringLen($Elementi) $Posti = 2 $n = $NumElem $k = $Posti ; (n + k - 1)! / ((k!(n-1)!) $membro1 = _MathFactorial($n + $k - 1) $membro2 = _MathFactorial($k) $membro3 = _MathFactorial($n-1) $Combinazioni = ($membro1) / (($membro2)*$membro3) MsgBox(0,0,$Combinazioni) Func _MathFactorial($mfFactor, $mfStop = 0) If Not (StringIsInt($mfFactor)) OR (Int($mfFactor) < 0) Then SetError(1) Return 0 Else $mfFactor = Int($mfFactor) EndIf If $mfFactor = 0 Then Return 1 Dim $return = 1 While $mfFactor > $mfStop $return *= $mfFactor $mfFactor -= 1 WEnd Return $return EndFunc now i have a limit of 17 characters
  14. thanks this will be useful in further! now i was trying to calculate the number of combinations using this: $Combinations = (factorial($n + $k - 1)) / (((factorial($k))*factorial((n-1))) but i can't find the function FACTORIAL (n!)
  15. hi guys, sorry for my bad english; I'm trying to do a script where i put in for example 1 and the script will show me 0 1 2 3 4 5 6 7 8 9 if i put in 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 .... 99 if i put in 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 999 AND THE ANSWER IS: is possible do this with alphabet? put in 1 return: A B C D E F G H I J K L M N .... Z put in 2 return: A B C D E F G H I L M N ... Z AA AB AC AD AE ... ZZ and putting 3 return: A B C D E F G H I L M N ... Z AA AB AC AD AE ... ZZ AAA AAB AAC AAD .... ZZZ
×
×
  • Create New...