Jump to content

new to auto it, need loop help


sammy
 Share

Recommended Posts

can i get some better help other than this guy above me

Edit : I did check the help file, a lot of things came up under the while loop, everything seems confusing to me since this is my first ever program i wrote in my life

Edited by sammy
Link to comment
Share on other sites

Bit picky are we?

Well he told you the CORRECT thing to do, so that you will lean. Maybe it will help you. Obviously you want it on a silver platter, so here it is:

While $needshelp <> False
    $needshelp = True
WEnd

Good luck with whatever you do, because if you don't try, you don't get help, you don't learn.

Brett

EDIT:

Oh and I should tell you that you shouldn't use that code, because it is sarcasm. If you do want the code, go to the help file. EVERYTHING is there.

Edited by BrettF
Link to comment
Share on other sites

can i get some better help other than this guy above me

Now did u get it?? haha.. :)

Good loop there Brett!! :)

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

Hi Sammy,

Man buddy! I can see you're only new here, so you must remember that you have much to learn! :)

I personally have no care if you call me an asshole or whatever, doesn't mean anything to me. I see in the end you got the message, and that's what matters more! (And yes! Your code is on the right track!)

Most of us here will not just hand you code on request. "On the silver platter" as so to speak. Personally I prefer you at least try- give stuff a go, search through the help file, through the forums, Google etc. I know you did not, because this topic has to get asked like 3 times a day along with many others- its not hard to get tired of the same things when you see it so much. All it takes is some work on your behalf!

I assume your new to AutoIt too, so go have a quick read of my tutorial, and a play around with AutoIt 1-2-3. Links are in my sig.

Good luck with your scripts.

Cheers,

Brett

Link to comment
Share on other sites

Thank you for what you just posted, i take back whatever mean things i said to you and i do understand that I have to learn on my behalf to get anywhere in programming. Everything is just so confusing to me right now, when I wrote the first part of my script, it had many errors in it because I left out some parenthesis, it took my about half an hour to figure out what was going wrong with it, i was kinda frustrated with it. I thought the loop was some calculus problem, so i asked you guys for help :)

Link to comment
Share on other sites

Another question, is there a such function that will detect a window name?

Look for WinGetTitle in help file..

P.S. I love Calculus..

Edited by Manjish
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

Thank you for what you just posted, i take back whatever mean things i said to you and i do understand that I have to learn on my behalf to get anywhere in programming. Everything is just so confusing to me right now, when I wrote the first part of my script, it had many errors in it because I left out some parenthesis, it took my about half an hour to figure out what was going wrong with it, i was kinda frustrated with it. I thought the loop was some calculus problem, so i asked you guys for help :)

:)

Do you use SciTE? If you don't or are using the one provided with the stock install, download it. My sig is the way to go again.

Cheers,

Brett

Link to comment
Share on other sites

  • 5 months later...

Look for WinGetTitle in help file..

P.S. I love Calculus..

So you like Calculus huh. Well I am new to AutoIt and I did take a VB/C++ class, although i hated it due to the fact programming doesnt come natural to me. But within a month, i will be taking Calculus 1 & 2 at my college and i got a feeling its gunna be tuff for me. So i am wondering do you have any Calculus programs or know where to find some written in AutoIt or already complied into a .exe from any script maker??? Cuz if you do can I have it pretty please?? i tried looking for some already, but not much luck :-( Any help or suggestions would be greatly appreciated!! Thanks.

Link to comment
Share on other sites

While $needshelp <> False
    $needshelp = True
WEnd

Haha, very funny, but I think you missed something!

Local $needshelp = 10, $assistance = 0
Do
   If $needshelp > $assistance Then
       $needshelp -= 1
       $assistance += 1
       MsgBox(0, "Needs help = " & $needshelp, "Assistance = " & $assistance)
   EndIf
Until $assistance >= $needshelp
Edited by czardas
Link to comment
Share on other sites

  • 1 month later...

Haha, very funny, but I think you missed something!

Local $needshelp = 10, $assistance = 0
Do
   If $needshelp > $assistance Then
       $needshelp -= 1
       $assistance += 1
       MsgBox(0, "Needs help = " & $needshelp, "Assistance = " & $assistance)
   EndIf
Until $assistance >= $needshelp

Not quite what one should be aiming at.. huh??

I think this one is a bit appropriate..

Global $needshelp=10, $assistance=0, $stop_being_a_lazy_ass=20

    MsgBox(64,"Status","Help Needed: "  & $needshelp*10 &" %" & @CRLF & "Tendency to be lazy: " & $stop_being_a_lazy_ass*5 &" %"&@CRLF & "Assistance given by forum members: " & $assistance*10 &" %")
If $needshelp<$stop_being_a_lazy_ass And $stop_being_a_lazy_ass=20 Then 
    MsgBox(16,"You don't deserve help!!","Get off your lazy ass and start working for a solution!!")
    $stop_being_a_lazy_ass-=5
EndIf

MsgBox(64,"Status","Help Needed: "  & $needshelp*10 &" %" & @CRLF & "Tendency to be lazy: " & $stop_being_a_lazy_ass*5 &" %"&@CRLF & "Assistance given by forum members: " & $assistance*10 &" %")
If $needshelp<$stop_being_a_lazy_ass And $stop_being_a_lazy_ass=15 Then 
    MsgBox(16,"Ok now you qualify for atleast some help","Show me your script")
    $stop_being_a_lazy_ass-=5
    $assistance+=2
EndIf

MsgBox(64,"Status","Help Needed: "  & $needshelp*10 &" %" & @CRLF & "Tendency to be lazy: " & $stop_being_a_lazy_ass*5 &" %"&@CRLF & "Assistance given by forum members: " & $assistance*10 &" %")
If $stop_being_a_lazy_ass=10 Then 
    MsgBox(16,"I will help you!!","Make these changes in your script")
    $stop_being_a_lazy_ass-=5
    $assistance+=5
    $needshelp-=3
EndIf

MsgBox(64,"Status","Help Needed: "  & $needshelp*10 &" %" & @CRLF & "Tendency to be lazy: " & $stop_being_a_lazy_ass*5 &" %"&@CRLF & "Assistance given by forum members: " & $assistance*10 &" %")
If $stop_being_a_lazy_ass=5 Then 
    MsgBox(16,"Now you are almost there!!","Make these changes in your script!!")
    $stop_being_a_lazy_ass-=5
    $assistance+=3
    $needshelp-=3
EndIf

MsgBox(64,"Status","Help Needed: "  & $needshelp*10 &" %" & @CRLF & "Tendency to be lazy: " & $stop_being_a_lazy_ass*5 &" %"&@CRLF & "Assistance given by forum members: " & $assistance*10 &" %")
If $stop_being_a_lazy_ass=0 Then 
    MsgBox(64,"There you go!!","Done!! Script is ready")
    $stop_being_a_lazy_ass-=5
    $assistance+=2
    $needshelp-=2
EndIf

MsgBox(4096,"Morale of the story","Help yourself and show an effort and only then expect help from others!!")

I made my point, and didn't need a loop for it!! :D

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

So you like Calculus huh. Well I am new to AutoIt and I did take a VB/C++ class, although i hated it due to the fact programming doesnt come natural to me. But within a month, i will be taking Calculus 1 & 2 at my college and i got a feeling its gunna be tuff for me. So i am wondering do you have any Calculus programs or know where to find some written in AutoIt or already complied into a .exe from any script maker??? Cuz if you do can I have it pretty please?? i tried looking for some already, but not much luck :-( Any help or suggestions would be greatly appreciated!! Thanks.

Just ask what you need and we'll together make a script for it.. What's the fun in searching for readymade scripts..???

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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...