Jump to content

can i take a part from a window!!


Recommended Posts

This will return the HTML code for you to use. Just embed a webpage in your script and use _IEBodyWriteHTML($IEName,$sCity) ($IEName is the name of your IE object)

#include <ie.au3>
#include <string.au3>

$oIE = _IECreate("http://ig.internetplus.biz/prayertimes/countryegypt/cityfayoom.html")
$sHTML = StringStripWS(_IEBodyReadHTML($oIE),4)
$sCity = "<div class=""city"">" & _StringBetween($sHTML,"<div class=""city"">","</tbody></table>")[0] & "</tbody></table>"

People have said it to you a lot in the past few days but really everything you need is in the helpfile. You've said you don't like it but we won't write a program for you, we'll help you and give you the right direction to go in but you really need to start looking through the helpfile, it's helpful.

Edited by dbzfanatic
Link to comment
Share on other sites

  • Moderators

yousefsamy,

Please stick to one thread at a time. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

But what happens is the reverse of your desires, and quite quickly.  Because when you do have a legitimate question, that you have actually put effort of your own towards, no one will read the thread because you are quickly joining the shortlist of people ignored by name.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Open the help file, try some of the examples, see how they work and stop asking for handouts. That's how you get answers.

You are going to have a very short lifespan on this forum with your attitude.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Moderators

yousefsamy,

I am going to make one final attempt to get through to you. :)

In >your very first thread I said:

If you look at the Help file (have you noticed how that is a constant refrain?)

and in >a subsequent thread I went into a lot more detail, but it seems you still do not follow the advice I gave you. :(

Think of the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever". We try to be net makers and repairers, not fishmongers. So we ask that people who seek help make some effort themselves - usually shown by posting some code (as you did in that first thread). It does not matter if the code does not work, what we want to see is some evidence that you are not just waiting for a working script to be provided. In this thread you asked how to incorporate a section of a website into a GUI - you were given some good indications in post #4. Yet we see no attempt on your part to show a script incorporating that advice - have you even tried? :huh:

And then when people gently point out that you are not behaving in a manner likely to get a lot of help you respond by telling them to go away. Not a good idea - you will just alienate them further. :(

So, try to use the code that was given to you earlier in the thread and see if you can get it to work - if not, then post what you have tried. That way people will see that you have made some effort and will be more likely to offer help. Because if you continue as you are at present they most certainly will not. ;)

I leave you with another quote from the second linked thread:

We all appreciate that you are young and that English is not your first language - we are also very happy to help you learn how to code in AutoIt. But you need to do some work as well - particularly when it comes to reading the Help file

That is still true - but you are the one who needs to change if you still wish us to help you. All clear? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba23

Here is what can i do with my code (my idea is moving scroll bar to the position what i want and hide it)

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
 #include <GuiScrollBars.au3>


$E = _IECreateEmbedded()


$Form1 = GUICreate("Simple", 386, 355, 328, 198)
$obj = GUICtrlCreateObj($E, 24, 24, 337, 305)
GUISetState(@SW_SHOW)
$navigate = _IENavigate($E,"http://ig.internetplus.biz/prayertimes/countryegypt/cityfayoom.html")

_GUIScrollBars_ShowScrollBar($obj,$SB_BOTH,False)
_GUIScrollBars_SetScrollInfoPos($obj,$SB_HORZ,30)
_GUIScrollBars_SetScrollInfoPos($obj,$SB_VERT,30)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

as you told me okay ^_^

Edited by yousefsamy
Link to comment
Share on other sites

Thats not so bad, i dont quite understand what you mean by then hide it....so im going off your last request of just capturing a portion of the screen.

Scroll to where you want, press the number 5, and it will capture the form minus the scroll bars then exit.  Push ESC if you just want to exit.

#include <WindowsConstants.au3>
#include <IE.au3>
#include <Misc.au3>
#include <ScreenCapture.au3>

$E = _IECreateEmbedded()


$Form1 = GUICreate("Simple", 386, 355, 328, 198, $WS_POPUPWINDOW)
$obj = GUICtrlCreateObj($E, 0, 0, 385, 355)
GUISetState(@SW_SHOW)
$navigate = _IENavigate($E,"foxnews.com" , 1)


While 1

    If _ispressed("35") Then
            _ScreenCapture_CaptureWnd(@ScriptDir & "\testcapture.jpg" , $Form1, 0 , 0 , 368 , 338)
            sleep(1000)
            shellexecute(@ScriptDir & "\testcapture.jpg")
            exit
        Endif

        If _ispressed("1b") Then
            exit
        Endif

WEnd
Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...