Jump to content

Newbies Question


dynty
 Share

Recommended Posts

Please dont laught at me,,i need your help:)

i have a lot of scrips in autoit,i love them,i use them in my work (iam system technician in a big factory) but i know,my scripts are lame:)

for example,one to set up options on some inet page

Func inbiz_set ();
Winactivate ("InBiz - Item And Bom Information Zone - Microsoft Internet Explorer")
ControlSetText ("InBiz - Item And Bom Information Zone - Microsoft Internet Explorer","",41477 ,"https://tools.cisco.com/emco/inbiz/inbiz/Home")
MouseClick("left", 213, 81, 1 ,1);
sleep (500)
Send("{ENTER}")
sleep (6500)
MouseClick("left",61 ,387,1,1);
Sleep (6000)
MouseClick("left",536 ,313,1,1);
Call ("Ctrla")
Send ("{DEL}")
Call ("ctrlv");
MouseClick("left",526 ,381,1,1);
Send ("3")
Send ("{ENTER}")
MouseClick("left",301 ,427,1,1);
Send ("{ENTER}")
Sleep (6000)
MouseClick("left",400 ,460,1,1);
Sleep (100)
MouseClick("left",402 ,460,1,1)
Sleep (100)
MouseClick("left",399 ,460,1,1)
Sleep (100)
MouseClick("left",385 ,460,1,1)
Sleep (100)
MouseClick("left",387 ,460,1,1)
Sleep (100)
MouseClick("left",416 ,460,1,1)
Sleep (100)
MouseClick("left",414 ,460,1,1)
MouseClick("left",353 ,514,1,1);
MouseClick("left",343 ,514,1,1);
WinWaitActive("https://mco.cisco.com/servlet/mco.ecm.inbiz.inbiz - Microsoft Internet Explorer", "", 5)
Call ("Saveas")
Endfunc

Iam getting Autoit mailings,i spend a lot of time on this pages,iam reading functions help,but it is quite hard:) anyways ,iam not a programmer,but iam clever,i can learn it all

to my questions:

Please,can anybody tell me in clear words,how to manage waiting times (on my example code) instead of the "sleep"? title of this page is allways the same,doesnot matter where iam clicking,so i cannot use the "winwaitactive". Can you please help me with this? This scripn navigates me trought a lot of pages,but the are controlled by java scripts,so whole window does not changes.

What ios an "expression"? where are they used? and how to use "strings"? what is better thing to controll database,than activate excel window,navigate on them by "Send ("{DOWN}")" Call ("CtrlC"),Send ("{LEFT}")

Edited by dynty
Link to comment
Share on other sites

Hey Dynty,

I'm not exactly sure what you're looking for because your questions are a little trciky to understand. However here are some ideas that I've used to manage pauses in the past, don't know if they'll be of any use but I've given it a crack.

If you have any processes then you could use:

While MouseGetCursor() = 15

sleep(10)

WEnd

This will wait until something has loaded or actuallyI think its while the cursor becomes an hourglass or something like that. Anyways, it can be useful for getting more accurate waiting times between clicks.

Link to comment
Share on other sites

Search the forum for the IE3 UDF (User Defined Function). That UDF can help you with the IE code that you posted. If you cannot figure that method out right away - look at this post (don't laugh) http://www.autoitscript.com/forum/index.php?showtopic=14395 It should show you another way to "wait" for webpages.

As for working with databases - it depends on the type of database - search this forum for the term database. COM might work for you here.

got to run....

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

Link to comment
Share on other sites

Please dont laught at me,,i need your help:)

i have a lot of scrips in autoit,i love them,i use them in my work (iam system technician in a big factory) but i know,my scripts are lame:)

for example,one to set up options on some inet page

Func inbiz_set ();
Winactivate ("InBiz - Item And Bom Information Zone - Microsoft Internet Explorer")
ControlSetText ("InBiz - Item And Bom Information Zone - Microsoft Internet Explorer","",41477 ,"https://tools.cisco.com/emco/inbiz/inbiz/Home")
MouseClick("left", 213, 81, 1 ,1);
sleep (500)
Send("{ENTER}")
sleep (6500)
MouseClick("left",61 ,387,1,1);
Sleep (6000)
MouseClick("left",536 ,313,1,1);
Call ("Ctrla")
Send ("{DEL}")
Call ("ctrlv");
MouseClick("left",526 ,381,1,1);
Send ("3")
Send ("{ENTER}")
MouseClick("left",301 ,427,1,1);
Send ("{ENTER}")
Sleep (6000)
MouseClick("left",400 ,460,1,1);
Sleep (100)
MouseClick("left",402 ,460,1,1)
Sleep (100)
MouseClick("left",399 ,460,1,1)
Sleep (100)
MouseClick("left",385 ,460,1,1)
Sleep (100)
MouseClick("left",387 ,460,1,1)
Sleep (100)
MouseClick("left",416 ,460,1,1)
Sleep (100)
MouseClick("left",414 ,460,1,1)
MouseClick("left",353 ,514,1,1);
MouseClick("left",343 ,514,1,1);
WinWaitActive("https://mco.cisco.com/servlet/mco.ecm.inbiz.inbiz - Microsoft Internet Explorer", "", 5)
Call ("Saveas")
Endfunc

Iam getting Autoit mailings,i spend a lot of time on this pages,iam reading functions help,but it is quite hard:) anyways ,iam not a programmer,but iam clever,i can learn it all

to my questions:

Please,can anybody tell me in clear words,how to manage waiting times (on my example code) instead of the "sleep"? title of this page is allways the same,doesnot matter where iam clicking,so i cannot use the "winwaitactive". Can you please help me with this? This scripn navigates me trought a lot of pages,but the are controlled by java scripts,so whole window does not changes.

What ios an "expression"? where are they used? and how to use "strings"? what is better thing to controll database,than activate excel window,navigate on them by "Send ("{DOWN}")" Call ("CtrlC"),Send ("{LEFT}")

first, check out ie.au3, it's included with the beta, or you can get it by itself by searching the forum for ie.au3. It will help you automate internet explorer very easily, including filling out and submitting forms, changing pages, waiting for pages to load etc. it really is an awesome UDF, and very well documented for easy implementation.

for your questions: an expression is a code fragment that can be evaluated to return a result. example:

$x = 1;an exp[b][/b]ression that assigns a value
if $x; an exp[b][/b]ression that evaluates another exp[b][/b]ression.

a string is just any string of characters. like "String". when it's in quotes like that (either single or double quotes) it's referred to as a 'literal' string, because it is interpretted exactly as entered. not all strings are literal though, sometimes you'll include variables, joining literal strings with dynamic values via Concatenation.

$var1 = "foo"
$var2 = "bar"
$aDynamicString = "This is concatenation using a literal string, and variables" & @LF & $var1 & $var2
$anotherString = $var1 & $var2;and you don't even need a literal string to create a string value

there are alot of string manipulation functions included by default (all covered by the help file) and alot that were made after the fact for additional functionality by other users. (check out scripts and scraps and the user defined functions included with beta install).

***edit*** i had clicked add reply too early, so had to edit to finish my post because i'm retarded.

Edited by cameronsdad
Link to comment
Share on other sites

many thanks to all of you,it helps a lot..il do some aditionall resarch on IE.AU3

If you have any processes then you could use:

While MouseGetCursor() = 15

sleep(10)

WEnd

this is great idea:) thanks a lot

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...