Sign in to follow this  
Followers 0
bosko

i need help coding a program

18 posts in this topic

i know Send("{F5}") is to refresh

but i have no clue how to do anything else so if somebeody could help me put this togather i would love them for ever and ever and wanna have mabies/babies :)

Share this post


Link to post
Share on other sites



put what together?


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

put what together?

<{POST_SNAPBACK}>

a refresher

i cant find it in the tutorial how to make a browser witha link and a button that starts reffreshing 5000times with a counter and one that stops it cant figure any of it out...

ps: does au3 have any books

?

Share this post


Link to post
Share on other sites

If you read the helpfile youll find what you need.


[quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

This is a stupid thread.

For $I = 1 To 5000
   Send("{F5}")
Next

My brain is acking from the thought involved.

Edit: As for a 'browser' I don't see the point... Try searching for cwebpage.dll.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

This is a stupid thread.

For $I = 1 To 5000
   Send("{F5}")
Next

My brain is acking from the thought involved.

Edit: As for a 'browser' I don't see the point... Try searching for cwebpage.dll.

<{POST_SNAPBACK}>

all that does is refresh the page its opened on whitch its opened on with no start and stop buttons if all i did was read the tuts i would have done that but i need something to imput a link as to where to refresh it doesnt need to show the page but so it doesnt disturbe the other pages

ex: when i oppened the file in my documents it started refreshing and i couldnt close the page...

thats why im trying to make it in a box

Share this post


Link to post
Share on other sites

...if all i did was read the tuts i would have done that...

<{POST_SNAPBACK}>

Wait a minute. If you saw the tutorial for sending text to Notepad, then you saw one way to use WinWaitActive. So, if you spent some time with the tutorials, then why would you "have done that..." ["That" referring to the loop that Burrup gave you.] Yes, the F5 is going to be sent to whatever window is active since you did not bother to add one line of code to the code which Burrup offered.

Do you want to learn AutoIt or have people write code for you? Ok, assuming that you want to learn. Go read about InetGet and HotKeySet...

For $I = 1 To 5000
   InetGet("http://www.mozilla.org", "C:\foo.html",1,0)
Next

In the help file for HotKeySet, there is a sample script at the bottom of the page. In that script is the remark:

;;;; Body of program would go here ;;;;

You replace the While/WEnd loop in the sample script with the For/Next loop shown above and replace the URL with the URL that you want...

You should have what you want - a script that:

"doesnt disturbe the other pages"

"start and stop buttons"

"reffreshing 5000times"

You do not need:

"a browser"

(if you want that - you have been told to search the forum for cwebpage.dll)

"something to imput a link as to where to refresh"

(if you want that - read about InputBox)

If you want "a counter" , then read about SplashTextOn.

So - you have a script that will run the "hit counter" up on a website, if the site/counter is poorly designed.

later


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Wait a minute. If you saw the tutorial for sending text to Notepad, then you saw one way to use  WinWaitActive. So, if you spent some time with the tutorials, then why would you "have done that..." ["That" referring to the loop that Burrup gave you.] Yes, the F5 is going to be sent to whatever window is active since you did not bother to add one line of code to the code which Burrup offered.

Do you want to learn AutoIt or have people write code for you? Ok, assuming that you want to learn. Go read about InetGet and HotKeySet...

For $I = 1 To 5000
   InetGet("http://www.mozilla.org", "C:\foo.html",1,0)
Next

In the help file for HotKeySet, there is a sample script at the bottom of the page. In that script is the remark:

;;;; Body of program would go here ;;;;

You replace the While/WEnd loop in the sample script with the For/Next loop shown above and replace the URL with the URL that you want...

You should have what you want - a script that:

"doesnt disturbe the other pages"

"start and stop buttons"

"reffreshing 5000times"

You do not need:

"a browser"

(if you want that - you have been told to search the forum for cwebpage.dll)

"something to imput a link as to where to refresh"

(if you want that - read about InputBox)

If you want "a counter" , then read about SplashTextOn.

So - you have a script that will run the "hit counter" up on a website, if the site/counter is poorly designed.

later

<{POST_SNAPBACK}>

im trying to work with gui's

; Press Esc to terminate script, Pause/Break to "pause", Press "Enter" to start

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Exit Program")
HotKeySet("ENTER", "Start")

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Refreser Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc



Func
    Start
For $I = 1 To 5000
   Send("{F5}")
Next
EndFunc

it says that Func (the last one) is badly formated

edit: i do need a browser or at least a link box because im not making this for

myself but for a cheat site

edit2: thats what i got when i used what you told me to use. without the .dll file

Edited by bosko

Share this post


Link to post
Share on other sites

You were smart enough to figure out what part of my suggestion not to follow :-)

... but you missed a few details :-(

Which one of these lines is missing a set of brackets{}?

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Exit Program")
HotKeySet("ENTER", "Start")

Which one of these lines has a bad "format"?

Func TogglePause()
Func Terminate()
Func
    Start

I cannot help you with GUIs. Did you read this?

"something to imput a link as to where to refresh"

(if you want that - read about InputBox)

so long


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Mozilla Firefox has a plugin called ReloadEvery, which will do the same thing that you want...

Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

You were smart enough to figure out what part of my suggestion not to follow :-)

... but you missed a few details :-(

Which one of these lines is missing a set of brackets{}?

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Exit Program")
HotKeySet("ENTER", "Start")

Which one of these lines has a bad "format"?

Func TogglePause()
Func Terminate()
Func
    Start

I cannot help you with GUIs. Did you read this?

"something to imput a link as to where to refresh"

(if you want that - read about InputBox)

so long

<{POST_SNAPBACK}>

kk i fixed all that. and this is how it looks like

; Press Esc to terminate script, Pause/Break to "pause", Press "Enter" to start

Global $Paused
HotKeySet("{PAUSE/BREAK}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{ENTER}", "Start")

;;;; Body of program would go here;;;;

While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Refreser Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc


Func Start()
For $I = 1 To 5000
   Send("{F5}")
Next
EndFunc

but now the hot keys ESC and PAUSE/BREAK dont work +its not refreshing in the right spot.... it just refreshes my doccuments

Edited by bosko

Share this post


Link to post
Share on other sites

it sounds as if you're trying to increase site hits via autoit... Not a very good idea both for the advertisers and for you, as you might end up loosing customers.

If this is the case, i'd make manually refresh the page first, as advertisers usually want to block this kind of roboting. In my experience, i build sites with anti roboting so i can offer advertisers a better deal.

Share this post


Link to post
Share on other sites

it sounds as if you're trying to increase site hits via autoit... Not a very good idea both for the advertisers and for you, as you might end up loosing customers.

If this is the case, i'd make manually refresh the page first, as advertisers usually want to block this kind of roboting. In my experience, i build sites with anti roboting so i can offer advertisers a better deal.

<{POST_SNAPBACK}>

WTF are you talking about increasing site hits? i need bloody help and im asking and getting answers....

geneious :)

Share this post


Link to post
Share on other sites

WTF are you talking about increasing site hits? i need bloody help and im asking and getting answers....

geneious :)

<{POST_SNAPBACK}>

haha he means you are doing it for another site to get high site viewing statistics...not on here

Genius :evil:

Share this post


Link to post
Share on other sites

haha he means you are doing it for another site to get high site viewing statistics...not on here

Genius :)

<{POST_SNAPBACK}>

all i said was its for a neopets cheat site didnt say whitch one speciflicly.....

so no more spam just ppl to help me with mny code

Share this post


Link to post
Share on other sites

Okay, this will work. Just replace the part where it says "edit here" with the url of the site you want to refresh. Here's the code:

;--------> EDIT URL HERE ---v
$sURL = "http://www.autoitscript.com/"
;--------> EDIT URL HERE ---^

Opt("WinTitleMatchMode", 2)
Global $pause = 0, $win = "- Microsoft Internet Explorer"
$oIE = ObjCreate("InternetExplorer.Application")
With $oIE
  .Navigate($sURL)
  While .ReadyState <> 4
    Sleep(10)
  Wend
  Sleep(500)
  .Visible = 1
EndWith
WinWaitActive($win, "")
Sleep(300)
WinSetState($win, "", @SW_MAXIMIZE)
WinSetOnTop($win, "", 1)

HotkeySet("{PAUSE}", "GoPause")
HotkeySet("{ESC}", "myexit")

While 1
  If not WinActive($win, "") Then WinActivate($win, "")
  If not WinExists($win, "") Then Exit
  Send("{F5}")
  While $oIE.ReadyState <> 4
    If not WinExists($win, "") Then Exit
    Sleep(10)
  Wend
Wend

Func GoPause()
  $pause = 1
  HotkeySet("{PAUSE}", "UnPause")
  While $pause
    Sleep(10)
  Wend
  HotkeySet("{PAUSE}", "GoPause")
EndFunc

Func UnPause()
  $pause = 0
EndFunc

Func myexit()
  WinKill($win, "")
  Exit
EndFunc

Try to learn from this, okay? :)

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Okay, this will work. Just replace the part where it says "edit here" with the url of the site you want to refresh. Here's the code:

;--------> EDIT URL HERE ---v
$sURL = "http://www.autoitscript.com/"
;--------> EDIT URL HERE ---^

Opt("WinTitleMatchMode", 2)
Global $pause = 0, $win = "- Microsoft Internet Explorer"
$oIE = ObjCreate("InternetExplorer.Application")
With $oIE
  .Navigate($sURL)
  While .ReadyState <> 4
    Sleep(10)
  Wend
  Sleep(500)
  .Visible = 1
EndWith
WinWaitActive($win, "")
Sleep(300)
WinSetState($win, "", @SW_MAXIMIZE)
WinSetOnTop($win, "", 1)

HotkeySet("{PAUSE}", "GoPause")
HotkeySet("{ESC}", "myexit")

While 1
  If not WinActive($win, "") Then WinActivate($win, "")
  If not WinExists($win, "") Then Exit
  Send("{F5}")
  While $oIE.ReadyState <> 4
    If not WinExists($win, "") Then Exit
    Sleep(10)
  Wend
Wend

Func GoPause()
  $pause = 1
  HotkeySet("{PAUSE}", "UnPause")
  While $pause
    Sleep(10)
  Wend
  HotkeySet("{PAUSE}", "GoPause")
EndFunc

Func UnPause()
  $pause = 0
EndFunc

Func myexit()
  WinKill($win, "")
  Exit
EndFunc

Try to learn from this, okay?  :D

<{POST_SNAPBACK}>

:) I LOVE YOU :evil:

edit: $oIE = ObjCreate("InternetExplorer.Application")

Unknown function name

Edited by bosko

Share this post


Link to post
Share on other sites

You need the latest beta version available in teh 3.1.1++ thread in the v3 Developers forum.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
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
Sign in to follow this  
Followers 0