Ashww Posted February 7, 2009 Share Posted February 7, 2009 Is it possible to have a script check for an image in a webpage? If so can some tell me how? Cheers Ashww X) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Link to comment Share on other sites More sharing options...
BrettF Posted February 7, 2009 Share Posted February 7, 2009 Get the source, StringInStr, Walla! Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 7, 2009 Share Posted February 7, 2009 (edited) Also check the second example for _IEImgGetCollection(), it can be modified for exactly this Edited February 7, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Ashww Posted February 7, 2009 Author Share Posted February 7, 2009 urm.... Could someone show me an example...Im trying to get the green arrows off this page there at the very right hand side.CheersAshww X) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Link to comment Share on other sites More sharing options...
ProgAndy Posted February 7, 2009 Share Posted February 7, 2009 (edited) To check the images, you can use _InetGetSource, StringInstr, StringRegExp etc: a good example with your site: #include<inet.au3> #include<Array.au3> ; Get Source $Source = _INetGetSource("http://www.rscheata.net/forum/index.php") ; Get Part of website with needed informations $begin = StringInStr($Source,"windowbg tp_rightblock_body") $End = StringInStr($Source,"Inaccurate? contact an admin.") $PartOfWebSite = StringMid($Source,$begin,$End-$begin) ; extract the information $Strings = StringRegExp($PartOfWebSite,'(?s)<img src="http://www.rscheata.net/tp/Themes/(.+?)".*?>.*?<a href=".*?">(.+?)</a>',3) If Not @error Then ;Make better Array Local $ServersUp[UBound($Strings)/2][2] For $i = 0 To UBound($Strings)-1 Step 2 $ServersUp[$i/2][0] = ($Strings[$i] = "up_g.gif") ; If server up: true, else false for down $ServersUp[$i/2][1] = $Strings[$i+1] ; the server type Next Else MsgBox(0, '', "No data") Exit EndIf _ArrayDisplay($ServersUp) Edited February 7, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Ashww Posted February 7, 2009 Author Share Posted February 7, 2009 I was hopeing to have it in a GUI like this: expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> Opt("TrayMenuMode",1) ; Default tray menu items will not be shown. $GUI = GUICreate("Checkup", 167, 277, 193, 125) GUISetBkColor(0xF4F7FC) $litegroup = GUICtrlCreateGroup("neXus iBot Lite", 32, 8, 89, 41) $litelable = GUICtrlCreateLabel("Up", 64, 24, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Progroup = GUICtrlCreateGroup("neXus iBot Pro", 32, 48, 89, 41) $Prolable = GUICtrlCreateLabel("Up", 64, 64, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Countergroup = GUICtrlCreateGroup("CounterStrike Servers", 8, 88, 145, 41) $Counterlable = GUICtrlCreateLabel("Up", 72, 104, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $IRCgroup = GUICtrlCreateGroup("IRC", 48, 128, 65, 41) $IRlable = GUICtrlCreateLabel("Up", 72, 144, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Ventgroup = GUICtrlCreateGroup("Ventrilo", 48, 168, 65, 41) $Ventlable = GUICtrlCreateLabel("Up", 72, 184, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Contactgroup = GUICtrlCreateGroup("Inaccurate?", 8, 208, 145, 41) $Contactlable = GUICtrlCreateLabel("Contact an admin!", 24, 224, 90, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) _Checkup() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Contactlable _IECreate("http://www.rscheata.net/forum/index.php/index.php?action=staff") EndSwitch WEnd Func _Checkup() EndFunc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Link to comment Share on other sites More sharing options...
ProgAndy Posted February 7, 2009 Share Posted February 7, 2009 You can put it in a GUI, but this is not so difficult, just try Read the array and set the Labels according to the values. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Ashww Posted February 7, 2009 Author Share Posted February 7, 2009 You can put it in a GUI, but this is not so difficult, just try Read the array and set the Labels according to the values.I dont get how to do it.Could could post the code just for the neXus iBot Lite lable and then ill try to understand the rest?CheersAshwwX) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Link to comment Share on other sites More sharing options...
BrettF Posted February 7, 2009 Share Posted February 7, 2009 *Cough* At least try and attempt it! Not many will write your script for you! Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted February 11, 2009 Share Posted February 11, 2009 A big hint: expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include<inet.au3> #include<Misc.au3> Opt("TrayMenuMode",1) ; Default tray menu items will not be shown. $GUI = GUICreate("Checkup", 167, 277, 193, 125) GUISetBkColor(0xF4F7FC) $litegroup = GUICtrlCreateGroup("neXus iBot Lite", 32, 8, 89, 41) $litelable = GUICtrlCreateLabel("Down", 64, 24, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Progroup = GUICtrlCreateGroup("neXus iBot Pro", 32, 48, 89, 41) $Prolable = GUICtrlCreateLabel("Down", 64, 64, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Countergroup = GUICtrlCreateGroup("CounterStrike Servers", 8, 88, 145, 41) $Counterlable = GUICtrlCreateLabel("Down", 72, 104, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $IRCgroup = GUICtrlCreateGroup("IRC", 48, 128, 65, 41) $IRlable = GUICtrlCreateLabel("Down", 72, 144, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Ventgroup = GUICtrlCreateGroup("Ventrilo", 48, 168, 65, 41) $Ventlable = GUICtrlCreateLabel("Down", 72, 184, 18, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Contactgroup = GUICtrlCreateGroup("Inaccurate?", 8, 208, 145, 41) $Contactlable = GUICtrlCreateLabel("Contact an admin!", 24, 224, 90, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) _Checkup() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Contactlable ShellExecute("http://www.rscheata.net/forum/index.php/index.php?action=staff") EndSwitch WEnd Func _Checkup() ; Prog@ndy ; Get Source $Source = _INetGetSource("http://www.rscheata.net/forum/index.php") ; Get Part of website with needed informations $begin = StringInStr($Source,"windowbg tp_rightblock_body") $End = StringInStr($Source,"Inaccurate? contact an admin.") $PartOfWebSite = StringMid($Source,$begin,$End-$begin) ; extract the information $Strings = StringRegExp($PartOfWebSite,'(?s)<img src="http://www.rscheata.net/tp/Themes/(.+?)".*?>.*?<a href=".*?">(.+?)</a>',3) If Not @error Then ;Make better Array Local $ServersUp[UBound($Strings)/2][2] For $i = 0 To UBound($Strings)-1 Step 2 $ServersUp[$i/2][1] = ($Strings[$i] = "up_g.gif") ; If server up: true, else false for down $ServersUp[$i/2][0] = $Strings[$i+1] ; the server type Next Else MsgBox(0, '', "No data") Local $ServersUp[5][2] = [["neXus iBot Lite"],["neXus iBot Pro"],["CounterStrike Servers"],["IRC"],["Ventrilo"]] EndIf For $i = 0 To UBound($ServersUp)-1 Switch StringStripWS($ServersUp[$i][0],7) Case "neXus iBot Lite" GUICtrlSetData($litelable,_Iif($ServersUp[$i][1],"Up","Down")) ... EndSwitch Next EndFunc *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now