Scripting
Forum rules
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Scripting
I stated that I was thinking about a very ambitious script project and I think I have run into a road block. The GUI works just fine but I wanted the buttons to start UVK functions. When I add the function names to the button code I get an error message saying there is no Wend statement then the function in the button code actually runs without ever loading the GUI.
I am gonna keep looking but is this even doable Fred?
I am gonna keep looking but is this even doable Fred?
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: Scripting
It is not "Can it be done?" but rather, "How can we do it?"
I saw this somewhere.
I saw this somewhere.

Play stupid games….win stupid prizes
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: Scripting
LOL your on a roll today Bill 
It can be done if it was coded to actually interpret different codes inline.

It can be done if it was coded to actually interpret different codes inline.
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: Scripting
Sorry Jim. I just couldn’t help myself.
I wish I could help you but I can’t.

Play stupid games….win stupid prizes
Re: Scripting
Jim, I'm actually glad you are putting your script skills into good use.
I can't say for sure without seeing the code but I would guess that either you are not closing the While loop with a WEnd statement, or there's something wrong after While that prevents the script from reaching WEnd.
I can't say for sure without seeing the code but I would guess that either you are not closing the While loop with a WEnd statement, or there's something wrong after While that prevents the script from reaching WEnd.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: Scripting
Just so you know, I moved this topic to the Help and support forum because it is not a tutorial.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: Scripting
Jim, do you want to post your code (or at least its skeleton) so we can help troubleshoot it? AutoIt GUI isn't my forté but I've done plenty of While/Wend's
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: Scripting
Xander
While/Wend isn't too bad. What I was trying to do was put "<UpdateJava>" in the while/Wend. If I took that out it worked just fine but if I added it then AutoIT would give an error but Java would update with no interaction....
That should sorta answer Fred's question as well
While/Wend isn't too bad. What I was trying to do was put "<UpdateJava>" in the while/Wend. If I took that out it worked just fine but if I added it then AutoIT would give an error but Java would update with no interaction....
That should sorta answer Fred's question as well
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: Scripting
Jim, You can't mix AutoIt and UVK script code. You can only add UVK scripting code after the end of your AutoIt script.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: Scripting
That'll do it. Think of using Autoit scripts within UVK as a Call command. Once you're out, you're out...until you're back in to UVK.
Why have the UpdateJava within the loop anyway? You can only update a single PC once so might as well do it either before or after your loop.
Why have the UpdateJava within the loop anyway? You can only update a single PC once so might as well do it either before or after your loop.
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: Scripting
Xander I have a feeling Fred knows what I was wanting to, atleast to a limited degree.
I don't want to loop the <UpdateJava>, there would not be much sense in that as you would have just done and it most likely would not have changed. Think outside the box
AutoIT from what I can tell is not object oriented so make it wait and see function you want to perform you have to include a While/Wend in it. You also have to put a "Sleep" in there (VB calls it "DoEvents") so that it does not site there grinding resources while it's waiting on you to make a decision. Because I am not sure of Freds feelings on such a thing a thing I am not going to state what my ultimate goal was with that idea. But that should give you better idea of why I was using a while/Wend
I don't want to loop the <UpdateJava>, there would not be much sense in that as you would have just done and it most likely would not have changed. Think outside the box

AutoIT from what I can tell is not object oriented so make it wait and see function you want to perform you have to include a While/Wend in it. You also have to put a "Sleep" in there (VB calls it "DoEvents") so that it does not site there grinding resources while it's waiting on you to make a decision. Because I am not sure of Freds feelings on such a thing a thing I am not going to state what my ultimate goal was with that idea. But that should give you better idea of why I was using a while/Wend

Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: Scripting
I'll just keep my mouth shut then.Charger440 wrote:Xander I have a feeling Fred knows what I was wanting to, atleast to a limited degree.
Re: Scripting
Jim, please do not use Sleep() in the while loop. whoever told you that does not know how it works. AutoIt is already optimized to idle the CPU in message loops.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: Scripting
Well, I wouldn't quite put it that way. I just meant that I bet Fred knew what I was wanting to do or at least had an idea.Xander wrote:I'll just keep my mouth shut then.Charger440 wrote:Xander I have a feeling Fred knows what I was wanting to, atleast to a limited degree.
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: Scripting
Fred I can use all the help I can getFred wrote:Just so you know, I moved this topic to the Help and support forum because it is not a tutorial.


Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"