Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/23/2019 in all areas

  1. this is a possible example what i spoken #include <IE.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <InetConstants.au3> #include <WinAPI.au3> #include <WinAPIsysinfoConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #include <INet.au3> ;#include <Excel.au3> #include <File.au3> #include <Array.au3> #include <Date.au3> #include <Misc.au3> #include <Debug.au3> Local $path = "https://www.immobiliare.it/ricerca.php?idCategoria=1&idContratto=1&idTipologia=&sottotipologia=&idTipologiaStanza=&idFasciaPrezzo=&idNazione=IT&idRegione=&idProvincia=&idComune=&idLocalita=&idAreaGeografica=&prezzoMinimo=&prezzoMassimo=&balcone=&balconeOterrazzo=&boxOpostoauto=&stato=&terrazzo=&bagni=&mappa=&foto=&superficie=&superficieMinima=&superficieMassima=&raggio=&locali=&localiMinimo=&localiMassimo=&criterio=rilevanza&ordine=desc&map=0&tipoProprieta=&arredato=&inAsta=&noAste=&aReddito=&fumatore=&animali=&franchising=&flagNc=&gayfriendly=&internet=&sessoInquilini=&vacanze=&categoriaStanza=&fkTipologiaStanza=&ascensore=&classeEnergetica=&verticaleAste=&occupazioneInquilini=&pag=1&vrt=43.84357086564766,10.488960742950441;43.84241015467616,10.494132041931154;43.84333872526002,10.493659973144533;43.84487083512528,10.49524784088135;43.84627910342516,10.49275875091553;43.8465421828286,10.49123525619507;43.845830318235556,10.490291118621828;43.84578389198876,10.488703250885011" $oIE = _IECreate($path, 0, 1, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer _IELoadWait($oIE, 1, 1) $sGHtmlPag = _IEBodyReadHTML($oIE) Local $aLLinkInserz = StringRegExp($sGHtmlPag, '(?i)<a title=".+?" id=".+?" href="(.*?)"', 3) _ArrayDisplay($aLLinkInserz) for $i=0 To ubound ($aLLinkInserz) -1 ; this is a simple for with array ; here you can open in tab (but i dont like )---> url 1...... to 10 --> $aLLinkInserz[$i] ; or open in new window ; and do much more ...... ; enjoy. Next
    1 point
  2. @nbarrosuriburu everything you state above is well known to the community. You are finding that, like other languages such as python, no one can control what a few bad apples choose to do with it. All we can do is keep the forum as free of that kind of stupidity as possible, to protect the reputation of the language. That is why you will see the forum rules specifically forbid things such as keyloggers, game bots, security measure bypasses, etc.
    1 point
  3. I tried to find some method of keeping the right-click context menu of a button, open, after selecting an entry. There are a few reasons why that might be desirable. I know I have done that before, possibly with VBA ... or maybe it was with TrayMenu or perhaps older AutoIt. Anyway, I could not find an existing solution here at the Forum or elsewhere. However I did come across some code by @LarsJ, that seemed to offer a pathway to a solution. https://www.autoitscript.com/forum/topic/145091-breaking-main-loop-when-context-menu-is-shown/?do=findComment&comment=1028169 After much experimentation, I eventually came up with a workable solution, that some of you might find useful. Strictly speaking, it does not keep the context menu open, instead it just instantly re-opens it to the selection (i.e. sub-menu) you just clicked. Here is my code. Enjoy! ; THANKS to LarsJ for the Menu Style element, that allowed the Case loop to continue while Context Menu is waiting for a selection. ; His example can be found at AutoIt Forums. ; https://www.autoitscript.com/forum/topic/145091-breaking-main-loop-when-context-menu-is-shown/?do=findComment&comment=1028169 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <Misc.au3> #include <GuiMenu.au3> Global $Button_menu, $Context_menu, $Extras_menu, $URL_menu Global $audio_item, $Batch_item, $Close_item, $Exit_item, $HD_item, $Paste_item Global $audio, $extra, $handle, $HD, $item, $pos, $style, $winpos $style = $WS_CAPTION + $WS_POPUP + $WS_CLIPSIBLINGS + $WS_SYSMENU $DropperGUI = GUICreate("Dropbox", 170, 110, Default, Default, $style, $WS_EX_TOPMOST) $Button_menu = GUICtrlCreateButton("Menu", 126, 85, 40, 19) GUICtrlSetFont($Button_menu, 7, 600, 0, "Small Fonts") GUICtrlSetTip($Button_menu, "Program Menu!") ; ; CONTEXT MENU $Context_menu = GUICtrlCreateContextMenu($Button_menu) $Paste_item = GUICtrlCreateMenuItem("Paste URL(s)", $Context_menu) GUICtrlCreateMenuItem("", $Context_menu) $Batch_item = GUICtrlCreateMenuItem("Batch Mode", $Context_menu, -1, 0) ; $Extras_menu = GUICtrlCreateMenu("&Extra Options", $Context_menu) $URL_menu = GUICtrlCreateMenu("&URL Options", $Extras_menu) $Params_item = GUICtrlCreateMenuItem("Use Extra Parameters", $URL_menu, -1, 0) $HD_item = GUICtrlCreateMenuItem("HD", $URL_menu, -1, 0) $audio_item = GUICtrlCreateMenuItem("Convert audio to AAC", $URL_menu, -1, 0) ; GUICtrlCreateMenuItem("", $Context_menu) GUICtrlCreateMenuItem("", $Context_menu) $Close_item = GUICtrlCreateMenuItem("Close", $Context_menu) GUICtrlCreateMenuItem("", $Context_menu) $Exit_item = GUICtrlCreateMenuItem("Exit", $Context_menu) $handle = GUICtrlGetHandle($Context_menu) _GUICtrlMenu_SetMenuStyle($handle, BitXOR(_GUICtrlMenu_GetMenuStyle($handle), $MNS_MODELESS)) $audio = 4 $extra = 4 $HD = 4 $item = "" GUISetState(@SW_SHOW) While 1 If $item == "extras" Then $item = "" Send("e") Send("u") ControlFocus($DropperGUI, "", $handle) EndIf $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit_item ; Close the program or Minimize the Window If _IsPressed("11") Then ; Minimize the Window GUISetState(@SW_MINIMIZE, $DropperGUI) WinSetTitle($DropperGUI, "", "URL Dropbox was created by TheSaint") Else ExitLoop EndIf Case $msg = $GUI_EVENT_MINIMIZE WinSetTitle($DropperGUI, "", "URL Dropbox was created by TheSaint") Case $msg = $GUI_EVENT_RESTORE WinSetTitle($DropperGUI, "", "URL Dropbox") Case $msg = $Button_menu ; Program Menu ControlClick($DropperGUI, "", $Button_menu, "right", 1) Case $msg = $Paste_item ; Paste URL(s) Case $msg = $Params_item ; Use Extra Parameters If $extra = 1 Then $extra = 4 ElseIf $extra = 4 Then $extra = 1 EndIf GUICtrlSetState($Params_item, $extra) $item = "extras" ReOpenContextMenu() Case $msg = $HD_item ; HD If $HD = 1 Then $HD = 4 ElseIf $HD = 4 Then $HD = 1 EndIf GUICtrlSetState($HD_item, $HD) $item = "extras" ReOpenContextMenu() Case $msg = $Batch_item ; Batch Mode Case $msg = $audio_item ; Convert audio to AAC If $audio = 1 Then $audio = 4 ElseIf $audio = 4 Then $audio = 1 EndIf GUICtrlSetState($audio_item, $audio) $item = "extras" ReOpenContextMenu() Case Else ; Other EndSelect WEnd ; GUISetState(@SW_HIDE) ; GUIDelete($DropperGUI) Exit Func ReOpenContextMenu() $mpos = MouseGetPos() $winpos = WinGetPos($DropperGUI, "") $pos = ControlGetPos($DropperGUI, "", $Button_menu) MouseMove($winpos[0] + $pos[0] + 10, $winpos[1] + $pos[1] + 30, 0) ControlClick($DropperGUI, "", $Button_menu, "right", 1) MouseMove($mpos[0], $mpos[1], 0) EndFunc I am fairly certain there is a nicer/cleaner/better method than mine, certainly as far as the SEND commands go, but I could not find it. The best way to test, is to select one of the sub menu items - Convert audio to AAC Extra Options -> URL Options -> Convert audio to AAC It should close and instantly re-open back at that option, with a visible tick now showing. A perfect example of wanting to keep the context menu open, is when you want to enable all three options in that submenu. Painful to re-browse to set each. You also get instant visual confirmation of the setting. NOTES You may note the mouse movement, and wonder why. Firstly, the context menu will always open (top left) at where the mouse cursor last was. So I ensure it is always the same location each time (MENU button). Secondly, after the context menu re-opens, if the mouse cursor is not over a menu entry, then a mouse move closes the sub menus ... defeating the process.
    1 point
  4. ...looking around found this posting and tried the DDE. Found that it does not like the server example compiled as 64 bit. The client example work compiled as 32 and 64bit. I don't know anything about DLL calls. Could you fix the UDF to make it 64bit friendly ? Thanks ( the emoji is to manipulate you emotionally into doing it )
    1 point
  5. Unless you can find another website that allows us to observe this behavior, then the only suggestion I would give is to use the debugging tools in Firefox or Chrome to try to identify a way to accomplish your goal using javascript. If you find a way, then you can generally convert that into something usable in Autoit.
    1 point
  6. detefon, The Opt function returns the current value of the defined parameter - that way you can reset it if necessary like this: $sPrevSep = Opt("GUIDataSeparatorChar", "*") ConsoleWrite("Prev sep char: " & $sPrevSep & @CRLF) $sReplacedSep = Opt("GUIDataSeparatorChar", $sPrevSep) ConsoleWrite("It was set to: " & $sReplacedSep & @CRLF)All clear? M23
    1 point
  7. Melba23

    Keyloggers

    The Forum Rules specifically mention that "keyloggers" are a prohibited subject on this forum. Of late we have had several threads locked because they have strayed (usually unwittingly) into keylogger territory. Here is a reminder of what Jon (the site owner) has set out as the basis for acceptability: "how to check for a few keys being pressed is one thing" We are not going to define "a few" in absolute terms, but if you post any code which checks for the best part of the keyboard you can be absolutely sure that you are in breach of the rules, that your thread will be locked, and that sanctions may follow. So please do not post such scripts - we do not want to be heavy-handed, but after this announcement your excuses had better be very good ones! M23
    1 point
  8. And an example: GUICreate('Example',200,200) $CHECKBOX = GUICtrlCreateCheckbox("This is a test",25,25,100,20) GUISetState() While 1 $MSG = GUIGetMsg() If $MSG = -3 Then Exit EndIf If GUICtrlRead($CHECKBOX) = 1 Then $STATE = "CHECK" Else $STATE = "UNCHECK" EndIf TrayTip("Checkbox State",$STATE,1) Sleep(20) WEnd
    1 point
×
×
  • Create New...