Jump to content

exe read from script line (is this possible?)


Recommended Posts

i would like to have it so the exe can do a func.. then jump to a line in the auto it script... but is this really possible? if it is what is the code? i hve checke the forums and nothing i found helps.. the help guide doesnt help. can you guys help?

Link to comment
Share on other sites

i would like to have it so the exe can do a func.. then jump to a line in the auto it script... but is this really possible? if it is what is the code? i hve checke the forums and nothing i found helps.. the help guide doesnt help. can you guys help?

If "the exe" and the "script" are the same program - then you are describing a "goto" function. That is not available in AutoIt3. Do you want to learn AutoIt2? :-) :-) :-)

It is best to post a small example of what you want done - then we might be able to give you some work arounds to not having a that evil goto function.

If you are talking about an EXE doing something and then reading/executing lines from another script... there are ways to do that too :-)

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

Link to comment
Share on other sites

damn.... that sucks... i take it there is no possible way to do this then?

Link to comment
Share on other sites

uhhhh i cant show you examples unless i rewrite my script.... but yeah what ill do is explain it... i would like the EXE to read a specific line in its autoit compilled scipt(of course i know it getts formated)... and then do the EXE from that line down the rest of the script... it sounds like GOTO is what i need... why is it evil?

Link to comment
Share on other sites

uhhhh i cant show you examples unless i rewrite my script.... but yeah what ill do is explain it... i would like the EXE to read a specific line in its autoit compilled scipt(of course i know it getts formated)... and then do the EXE from that line down the rest of the script... it sounds like GOTO is what i need... why is it evil?

compiled .EXE from .AU3

this line should be include 'some_items at specified area' => call "specified_area"

.

.

.

func specified_are()

$whatDoYouWant = you want to this area?

endFunc

.

.

.

You got the specified area!

Link to comment
Share on other sites

ill have to try that later

Link to comment
Share on other sites

You can do what as known as pseudo code. Simply put, you list the logical steps your code is to take. Remember, computers only do what you tell them to do, so look at this example of you going to the store to buy milk to figure out how your code's logic will run:

1. Leave your house

2. Open car door

3. Get into car

4. Start car

5. Drive to store

6. Park car in parking lot

7. get out of car

8. Walk into store

9. Pick up milk

10. Pay for milk.

Lay out your example like that example, and we will see what we can do to help.

Link to comment
Share on other sites

1. Leave your house

2. Open car door

3. Get into car

4. Start car

5. Drive to store

6. Park car in parking lot

7. get out of car

8. Walk into store

9. Pick up milk

10. Pay for milk.

11. Exit store

11. See that car has been stolen :Goto step 7a and lock car.

:-)

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

Link to comment
Share on other sites

wow random..... anyway i guess i dont NEED to use this event im asking for... if i just rearrange my script alittle... bTW WHY is goto evil again? thats all i hear about it

Link to comment
Share on other sites

wow random..... anyway i guess i dont NEED to use this event im asking for... if i just rearrange my script alittle... bTW WHY is goto evil again? thats all i hear about it

It defeats the purpose of structured programming. It is very difficult to follow code when you have labels and gotos all over the place. Generally, "break" and "continue" are also a bad practice to use for the same reason.

label1:
         int x = 0;
         goto label2;
 label2:
         x++;
         if (x < 100) goto label2;
         goto label3;
 label3:
         printf("We're done!");
         exit();

compared to

int x = 0;
 while (x < 100) x++;
 printf("We're done!");

Take youre pick. :mellow:

Link to comment
Share on other sites

lol i guess your right but again.... i dont really need to use it anymore i have a new problem that i have posted in the general help forum :\ ill eventually learn this stuff

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