Jump to content

trickytroy

Active Members
  • Posts

    36
  • Joined

  • Last visited

trickytroy's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Perfect! Thanks Friend.
  2. Hi Folks, I used to use Autoit back in the day and have since stopped writing script. but recently, i've found the need for a small program that would really help me out. So if you have a few minutes, I would appreciate it. I need a script that loops and constantly searches the current open window for this pixel color: 0xABD679. If the color is found, I need the cursor to click it and then a delete key command. Simple as that. I assume that it will be a sort of Ifthen command within a loop. I just don't remember how to do that. I would appreciate the help! Thanks friends!
  3. Hey Guys! I kinda lost interest in autoit including troyzilla last year lol but now im really bored and kinda getting interested again especially after seeing all the posts on this topic and people trying to keep troyzilla ALIVE! lol so i decided im gonna start working on it again. I added the Enter hot key and ctrl enter hot key code provided by Adam1213. thanx dude. Before i stopped working on trozilla my friend Eric was trying to help me ad the fav list and im not exactly sure what we added means cuz its been so long. so help would be nice. heres the code: #include <GuiConstants.au3> #include <File.au3> #include <Misc.au3> ;-------------------------------------------------------------------------------------------------------------------------------------- ;Creates the parent gui with buttons, menu's text fields $gui = GUICreate("Troyzilla 1.0", @DesktopWidth, @DesktopHeight, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_MAXIMIZE) GUISetState( @SW_MAXIMIZE ) $back = GUICtrlCreateButton("Back", 10, 20, 40, 30, $BS_BITMAP) $forward = GUICtrlCreateButton("Forward", 55, 20, 40, 30, $BS_BITMAP) $refresh = GUICtrlCreateButton("Refresh", 100, 20, 40, 30, $BS_BITMAP) $GO = GUICtrlCreateButton("GO", 810, 20, 50, 30, $BS_BITMAP) $Combo_5 = GUICtrlCreateCombo("http://www.google.com", 150, 25, 640, 21);$GUI_DEFBUTTON $pic = GUICtrlCreatePic("images\troyzilla.jpg", 890, 5, 85, 53) $filemenu = GUICtrlCreateMenu ("&File") ;creates the file menu $fileitem = GUICtrlCreateMenuitem ("Open",$filemenu) ;creates open in the file menu GUICtrlSetState(-1,$GUI_DEFBUTTON) $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) ;Creates exit in the file menu $saveitem = GUICtrlCreateMenuitem ("Save",$filemenu);Creates Save in the file menu GUICtrlSetState(-1, $GUI_DEFBUTTON) $recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1) ;Creates recent items in the file menu $separator1 = GUICtrlCreateMenuitem ("",$filemenu,2);creates a separator line $helpmenu = GUICtrlCreateMenu ("Help") ;Creates the help menu $infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu) ;Creates info in the help menu $viewmenu = GUICtrlCreateMenu("View",-1,1);Creates view menu $viewfavitem = GUICtrlCreateMenuitem ("Favorites",$viewmenu);Creates Favorites in the view menu ;---------------------------------------------------------------------------------------------------------------------------------------- ;Sets the picture of the buttons on the page GUICtrlSetImage ( $back, "images\back.bmp") GUICtrlSetImage ( $Forward, "images\forward.bmp") GUICtrlSetImage ( $refresh, "images\refresh.bmp") GUICtrlSetImage ( $GO, "images\go.bmp") ;---------------------------------------------------------------------------------------------------------------------------------------------------------- ;Creates the info gui $info = GUICreate("About Troyzilla", 290, 382,(@DesktopWidth-290)/2, (@DesktopHeight-382)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE, $WS_EX_TOOLWINDOW) $OK = GuiCtrlCreateButton("OK", 80, 330, 120, 40) $Pic_2 = GuiCtrlCreatePic("images/info.jpg", 0, 0, 290, 310) GUISetState( @SW_HIDE, $info ) $fav = GuiCreate("Projects" , 235, 670,2, 80 , $WS_CHILD + $WS_VISIBLE + $WS_SIZEBOX + $WS_EX_TOOLWINDOW ,"", $gui) $Add = GuiCtrlCreateButton("Add", 20, 50, 70, 30) $Delete = GuiCtrlCreateButton("Delete", 130, 50, 70, 30) $Favorites_label = GuiCtrlCreateLabel("Favorites", 20, 20, 210, 20) $Close = GuiCtrlCreateButton("Close", 70, 630, 70, 30) $favlist = GUICtrlCreateList("", 2, 85, 230, 550, $LBS_SORT ) GuiSetState(@SW_HIDE, $fav) ;--------------------------------------------------------------------------------------------------------------------------------------------------------- ;creates the child gui that the dll will be held in. $internetgui = GUICreate("", @DesktopWidth -15, @DesktopHeight - 190, 3, 78, $WS_CHILD + $WS_BORDER, "", $gui) GUISetState() ;----------------------------------------------------------------------------------------------------------------------------------------- ;opens dll then calls it. $dll = DllOpen("cwebpage.dll") DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $internetgui) DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.google.com") ;----------------------------------------------------------------------------------------------------------------------------------------------------- ;Sets the Enter key and CtrlEnter hotkeys. special thanx to Adam1213 HotKeySet ("{enter}" ,"onenter" ) HotKeySet ("^{enter}" ,"ongo2" ) func ongo2() HotKeySet ("^{enter}") if WinActive ("Troyzilla 1.0")=="1" then sleep(100) $temp=GUICtrlRead($Combo_5) if StringInStr ($temp, ".ttp://www.") == "0" then $temp="http://www." & $temp if StringInStr ($temp, ".com") == "0" then $temp=$temp & ".com" GUICtrlSetData ($Combo_5, $temp) DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", $temp); tells the dll to go to the web page thats in the combobox sleep(100) $temp=GUICtrlRead($Combo_5) if StringInStr ($temp, ".ttp://www.") == "0" then $temp="http://www." & $temp if StringInStr ($temp, ".com") == "0" then $temp=$temp & ".com" GUICtrlSetData ($Combo_5, $temp) else send("^{enter}") endif HotKeySet ("^{enter}" ,"ongo2" ) endfunc func onenter() if WinActive ("Troyzilla 1.0")=="1" then DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", GUICtrlRead($Combo_5)); tells the dll to go to the web page thats in the combobox else call ("sendenter") endif endfunc func sendenter() HotKeySet ("{enter}"); unset hotkey send ("{enter}"); send enter HotKeySet ("{enter}" ,"onenter" ); set hotkey endfunc ;=================================================================================================== ====================================== While 1 $msg = GUIGetMsg() $msg2 = GUICtrlGetState ($Combo_5) Select Case $msg = $GUI_EVENT_CLOSE; states that if the close button is it the script will exit if WinActive($info) Then GUISetState(@SW_HIDE) Else Exit EndIf Case $msg = $GO DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", GUICtrlRead($Combo_5)); tells the dll to go to the web page thats in the combobox Case $msg = $back DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 0);tells the webpage to go back Case $msg = $forward DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 1);tells the webpage to go forward Case $msg = $refresh DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 4);tells the webpage to refresh Case $msg = $exititem; sets the exit item in the menu to exit Exit Case $msg = $OK GUISetState( @SW_HIDE, $info ); tells the info gui to hide ; makes the open file box and makes it open the file in the webpage dll Case $msg = $fileitem $file = FileOpenDialog("Open","C:","HTML (*.html;*.htm)") If @error <> 1 Then GUICtrlCreateMenuitem ($file ,$recentfilesmenu) If $msg = $fileitem Then DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", $file) ;makes the save file box and saves the current page Case $msg = $saveitem $save = FileSaveDialog ("Save", @DesktopDir, "Html (*.html)", 3, "") InetGet(GUICtrlRead($Combo_5), $save & ".html", 1,0) Case $msg = $infoitem GuiSetState(@SW_SHOW, $info); shows the info gui Case $msg = $viewfavitem WinMove($internetgui, "", 245, 78,@DesktopWidth - 250, @DesktopHeight - 190) GuiSetState(@SW_SHOW, $fav); shows the fav gui Dim $Page _FileReadToArray ( "fav\fav.txt", $page ) For $x = 1 to $page[0] GUICtrlSetData($favlist, GuiCtrlRead ( $favlist ) & "|" & $page) Next Case $msg = $Close GuiSetState(@SW_HIDE, $fav); shows the fav gui WinMove($internetgui, "", 3, 78,@DesktopWidth -15, @DesktopHeight - 190) Case $msg = $Add FileWriteLine("fav\fav.txt", GUICtrlRead($Combo_5)) GUICtrlSetData($favlist, GuiCtrlRead ( $favlist ) & "|" & GUICtrlRead($Combo_5)) EndSelect WEnd Exit
  4. im not sure what your question is. autoit has a pixel search function and a hotkeyset function.
  5. you can just check the state of the radio buttons and check boxes.
  6. Can you compile it and post it so i dont have to dl auto it on this stupid comp. please??
  7. If you read the helpfile youll find what you need.
  8. Ya its saved as an .au3.
  9. Hi, no matter how many times a reinstall scite, when i go to tools it doesnt give all of the cool tools like gui builder and the other tools, also when i'm starting to type out a word like "While" for example on my other computer when i type "Wh' a tool tip pops up showing me all of the words that start with "Wh" and for some reason it doesnt do that any more. also, i recently installed beta, could that have any thing to do with it?? Thanks in advanced.
  10. Nvm, I figured it out. Sorry!
  11. For some reason I cant send multiple values to my list box, for example when I press the add button it adds text to the list box, but if I press it again it just overwrites the first one. Heres my code #include <GuiConstants.au3> #include <File.au3> ;Creates the parent gui with buttons, menu's text fields $gui = GUICreate("Troyzilla 1.0", @DesktopWidth, @DesktopHeight, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_MAXIMIZE) GUISetState( @SW_MAXIMIZE ) $back = GUICtrlCreateButton("Back", 10, 20, 40, 30, $BS_BITMAP) $forward = GUICtrlCreateButton("Forward", 55, 20, 40, 30, $BS_BITMAP) $refresh = GUICtrlCreateButton("Refresh", 100, 20, 40, 30, $BS_BITMAP) $GO = GUICtrlCreateButton("GO", 810, 20, 50, 30, $BS_BITMAP) $Combo_5 = GUICtrlCreateCombo("http://www.google.com", 150, 25, 640, 21, $GUI_DEFBUTTON) $pic = GUICtrlCreatePic("images\troyzilla.jpg", 890, 5, 85, 53) $filemenu = GUICtrlCreateMenu ("&File") ;creates the file menu $fileitem = GUICtrlCreateMenuitem ("Open",$filemenu) ;creates open in the file menu GUICtrlSetState(-1,$GUI_DEFBUTTON) $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) ;Creates exit in the file menu $saveitem = GUICtrlCreateMenuitem ("Save",$filemenu);Creates Save in the file menu GUICtrlSetState(-1, $GUI_DEFBUTTON) $recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1) ;Creates recent items in the file menu $separator1 = GUICtrlCreateMenuitem ("",$filemenu,2);creates a separator line $helpmenu = GUICtrlCreateMenu ("Help") ;Creates the help menu $infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu) ;Creates info in the help menu $viewmenu = GUICtrlCreateMenu("View",-1,1);Creates view menu $viewfavitem = GUICtrlCreateMenuitem ("Favorites",$viewmenu) ;Creates Favorites in the view menu ;Sets the picture of the buttons on the page GUICtrlSetImage ( $back, "images\back.bmp") GUICtrlSetImage ( $Forward, "images\forward.bmp") GUICtrlSetImage ( $refresh, "images\refresh.bmp") GUICtrlSetImage ( $GO, "images\go.bmp") ;Creates the info gui $info = GUICreate("About Troyzilla", 290, 382,(@DesktopWidth-290)/2, (@DesktopHeight-382)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE, $WS_EX_TOOLWINDOW) $OK = GuiCtrlCreateButton("OK", 80, 330, 120, 40) $Pic_2 = GuiCtrlCreatePic("images/info.jpg", 0, 0, 290, 310) GUISetState( @SW_HIDE, $info ) $fav = GuiCreate("Projects" , 235, 670,2, 80 , $WS_CHILD + $WS_VISIBLE + $WS_SIZEBOX + $WS_EX_TOOLWINDOW ,"", $gui) $Add = GuiCtrlCreateButton("Add", 20, 50, 70, 30) $Delete = GuiCtrlCreateButton("Delete", 130, 50, 70, 30) $Favorites_label = GuiCtrlCreateLabel("Favorites", 20, 20, 210, 20) $Close = GuiCtrlCreateButton("Close", 70, 630, 70, 30) $favlist = GUICtrlCreateList("", 2, 85, 230, 550, $LBS_SORT ) GuiSetState(@SW_HIDE, $fav) ;creates the child gui that the dll will be held in. $internetgui = GUICreate("", @DesktopWidth -15, @DesktopHeight - 190, 3, 78, $WS_CHILD + $WS_BORDER, "", $gui) GUISetState() ;opens dll then calls it. $dll = DllOpen("cwebpage.dll") DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $internetgui) DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.google.com") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE; states that if the close button is it the script will exit if WinActive($info) Then GUISetState(@SW_HIDE) Else Exit EndIf Case $msg = $GO DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", GUICtrlRead($Combo_5)); tells the dll to go to the web page thats in the combobox Case $msg = $back DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 0);tells the webpage to go back Case $msg = $forward DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 1);tells the webpage to go forward Case $msg = $refresh DLLCall($dll,"none","DoPageAction","hwnd",$internetgui,"int", 4);tells the webpage to refresh Case $msg = $exititem; sets the exit item in the menu to exit Exit Case $msg = $OK GUISetState( @SW_HIDE, $info ); tells the info gui to hide ; makes the open file box and makes it open the file in the webpage dll Case $msg = $fileitem $file = FileOpenDialog("Open","C:","HTML (*.html;*.htm)") If @error <> 1 Then GUICtrlCreateMenuitem ($file ,$recentfilesmenu) If $msg = $fileitem Then DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", $file) ;makes the save file box and saves the current page Case $msg = $saveitem $save = FileSaveDialog ("Save", @DesktopDir, "Html (*.html)", 3, "") InetGet(GUICtrlRead($Combo_5), $save & ".html", 1,0) Case $msg = $infoitem GuiSetState(@SW_SHOW, $info); shows the info gui Case $msg = $viewfavitem WinMove($internetgui, "", 245, 78,@DesktopWidth - 250, @DesktopHeight - 190) GuiSetState(@SW_SHOW, $fav); shows the fav gui Dim $Page _FileReadToArray ( "fav\fav.txt", $page ) For $x = 1 to $page[0] GUICtrlSetData($favlist, GuiCtrlRead ( $favlist ) & "|" & $page) Next Case $msg = $Close GuiSetState(@SW_HIDE, $fav); shows the fav gui WinMove($internetgui, "", 3, 78,@DesktopWidth -15, @DesktopHeight - 190) Case $msg = $Add FileWriteLine("fav\fav.txt", GUICtrlRead($Combo_5)) GUICtrlSetData($favlist, GuiCtrlRead ( $favlist ) & "|" & GUICtrlRead($Combo_5)) EndSelect WEnd Exit
  12. I've come across a problem. when i set the $BS_DEFPUSHBUTTON on the go button, it wroks and everything but if im typing in.. say.. google search or any search engine when i press enter to search for the webpage it just presses the go button on the main gui! and doesnt hit search in the webpage. does any body know how to fix this??
  13. Well if youe search the net for cwebpage.dll you can download it. So thats what i did. Note:expect a new version soon, with a favorites list!!!
  14. ya but it doesnt display the spaces beetween words
  15. hmm do you guys know how to read multiple lines in the command FileReadLine ( filehandle or "filename" [, line] )
×
×
  • Create New...