Sign in to follow this  
Followers 0
historyoftheday

not run correcly at fisrt time execute

13 posts in this topic

hi,,

somebody help me please..

why my scripct not run correctly at first run?

but at 2nd or 3rd it can play like what i want.

so when i run it at different computer i must run more than 1.

sorry for my bad english.

Share this post


Link to post
Share on other sites



hi,,

somebody help me please..

why my scripct not run correctly at first run?

but at 2nd or 3rd it can play like what i want.

so when i run it at different computer i must run more than 1.

sorry for my bad english.

Let me see...

Yes, I see it now, your script is performing badly because you make use of poor programming habits and you're understanding of the language can use a little improvement!

But don't worry, there's a workaround for this, you must study the language a little more, and make use of the help file that came with it as well.


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

What game is it for?

1 person likes this

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Put code here to review any possible errors

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Let me see...

Yes, I see it now, your script is performing badly because you make use of poor programming habits and you're understanding of the language can use a little improvement!

But don't worry, there's a workaround for this, you must study the language a little more, and make use of the help file that came with it as well.

but its just simple and nothing wrong i think.

it can run,but must try this script twice so can run correcly.

What game is it for?

its make dial

Put code here to review any possible errors

Run("control inetcpl.cpl") ;load internet properties
Sleep(500)
Sleep(500)
Send("^{TAB 1}") ;milih tab 4
Sleep(500)
Send("^{TAB 1}")
Sleep(500)
Send("^{TAB 2}")
Sleep(500)
Send("!d") ;add
Sleep(500)
Send("!r") ;pppoe
Sleep(500)
Send("!u") ;kolom username
Sleep(500)
Send("ttm_229") ; masukin username
Sleep(500)
Send("!p") ; kolom password
Sleep(500)
Send("asdiop789") ;password
Sleep(500)
Send("!n") ;pppoe
Sleep(500)
Send("belajar") ;masukin nama connection
Sleep(500)
Send("!r") ;remember password
Sleep(500)
Send("!c") ;connect
Sleep(500)
Send("!s") ;skip testing
Sleep(500)
Send("!c") ;close
Sleep(500)
WinClose("Internet Properties") ; internet propertiesnya diclose

can someone answer my question?

Edited by historyoftheday

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

but its just simple and nothing wrong i think.

it can run,but must try this script twice so can run correcly.

its make dial

can someone answer my question?

I wouldn't really know since I have very little experience in automating guis or using anything with "send" in the function name, but you might try using sendkeepactive or control send?

Edited by ApudAngelorum

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

Maybe it's a timing issue, and your initial delays only allow enough time for the script to run correctly after it's been run once already (therefore cached). Starting out like this might be an improvement:

Run("control inetcpl.cpl,,4") ;load internet properties/connections
WinWaitActive("Internet Properties")
Send("!d") ;add

Share this post


Link to post
Share on other sites

but its just simple and nothing wrong i think.

it can run,but must try this script twice so can run correcly.

its make dial

Run("control inetcpl.cpl") ;load internet properties
Sleep(500)
Sleep(500)
Send("^{TAB 1}") ;milih tab 4
Sleep(500)
Send("^{TAB 1}")
Sleep(500)
Send("^{TAB 2}")
Sleep(500)
Send("!d") ;add
Sleep(500)
Send("!r") ;pppoe
Sleep(500)
Send("!u") ;kolom username
Sleep(500)
Send("ttm_229") ; masukin username
Sleep(500)
Send("!p") ; kolom password
Sleep(500)
Send("asdiop789") ;password
Sleep(500)
Send("!n") ;pppoe
Sleep(500)
Send("belajar") ;masukin nama connection
Sleep(500)
Send("!r") ;remember password
Sleep(500)
Send("!c") ;connect
Sleep(500)
Send("!s") ;skip testing
Sleep(500)
Send("!c") ;close
Sleep(500)
WinClose("Internet Properties") ; internet propertiesnya diclose

can someone answer my question?

this code is not correct for all windows

for example: windows 7

+

Your Code is not correct

+

You need (Control) commands for more control the window (Internet Propestion)

send for me the way of you want (images)

Example:

Posted Image

and I send best code for you (Work in Windows XP & 7 ;) )

note: Sorry, My windows is arabic

note2: Sorry for my bad english

Share this post


Link to post
Share on other sites

Maybe it's a timing issue, and your initial delays only allow enough time for the script to run correctly after it's been run once already (therefore cached). Starting out like this might be an improvement:

Run("control inetcpl.cpl,,4") ;load internet properties/connections
WinWaitActive("Internet Properties")
Send("!d") ;add

thanks,,

i was try at some computer and can run more better.

:)

this code is not correct for all windows

for example: windows 7

+

Your Code is not correct

+

You need (Control) commands for more control the window (Internet Propestion)

send for me the way of you want (images)

and I send best code for you (Work in Windows XP & 7 ;) )

note: Sorry, My windows is arabic

note2: Sorry for my bad english

Posted Image

if my script run correctly it will create connection like that.

i was try it 1 by 1 and that scripct correct,

which part wrong?

i run at win 7

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

This code is best ;) :

$UserName = "ttm_229"
$Password = "asdiop789"
$ConnectName = "belajar"
Run("control inetcpl.cpl") ;load internet properties
Sleep(500)
WinWait("[CLASS:#32770]", "")
Send("^{TAB 4}")
Sleep(500)
ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:2]") ;addnbela
Sleep(500)
WinWait("[CLASS:NativeHWNDHost]", "")
Send("{ENTER}") ;pppoe
Sleep(500)
ControlClick("[CLASS:NativeHWNDHost]", "", "[CLASS:Edit; INSTANCE:1]") ;kolom username
Sleep(500)
Send($UserName) ; masukin username
Sleep(500)
Send("{TAB}") ; kolom password
Sleep(500)
Send($Password) ;password
Sleep(500)
Send("{TAB 2}")
Sleep(500)
Send("{SPACE}") ;remeber password
Sleep(500)
Send("{TAB}")
Sleep(500)
Send($ConnectName) ;masukin nama connection
Sleep(500)
Send("{TAB}")
Sleep(500)
Send("{SPACE}") ;Adminstrator
Sleep(500)
Send("{ENTER}") ;connect
Sleep(500)
Send("{ENTER}") ;skip testing
Sleep(2000)
WinClose("[CLASS:NativeHWNDHost]", "") ;close
Sleep(500)
WinClose("[CLASS:#32770]", "") ; internet propertiesnya diclose
Edited by yones7x

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Why not open directly to tab 4?

Run("control inetcpl.cpl,,4")
Edited by Spiff59

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

This code is best ;) :

$UserName = "ttm_229" $Password = "asdiop789" $ConnectName = "belajar" Run("control inetcpl.cpl") ;load internet properties Sleep(500) WinWait("[CLASS:#32770]", "") Send("^{TAB 4}") Sleep(500) ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:2]") ;addnbela Sleep(500) WinWait("[CLASS:NativeHWNDHost]", "") Send("{ENTER}") ;pppoe Sleep(500) ControlClick("[CLASS:NativeHWNDHost]", "", "[CLASS:Edit; INSTANCE:1]") ;kolom username Sleep(500) Send($UserName) ; masukin username Sleep(500) Send("{TAB}") ; kolom password Sleep(500) Send($Password) ;password Sleep(500) Send("{TAB 2}") Sleep(500) Send("{SPACE}") ;remeber password Sleep(500) Send("{TAB}") Sleep(500) Send($ConnectName) ;masukin nama connection Sleep(500) Send("{TAB}") Sleep(500) Send("{SPACE}") ;Adminstrator Sleep(500) Send("{ENTER}") ;connect Sleep(500) Send("{ENTER}") ;skip testing Sleep(2000) WinClose("[CLASS:NativeHWNDHost]", "") ;close Sleep(500) WinClose("[CLASS:#32770]", "") ; internet propertiesnya diclose
WinClose("[CLASS:#32770]", "")

this command not run at my pc.

idk why.

maybe auto it cant execute class name except alfbetic class.

Why not open directly to tab 4?

Run("control inetcpl.cpl,,4")
thanks for all atenttion..

my problem solved..

:)

Edited by historyoftheday

Share this post


Link to post
Share on other sites

This don't run because the window of connect setting don't allow to control it by winclose

Good luck

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