Re: [Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-10 Thread Melvin Raymond
Question #680146 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680146 Melvin Raymond posted a new comment: Yep. That's much better. I hadn't made attempts to clean it up yet. I do want to keep some of the print statements in there for Robot Framework to make things easier for

Re: [Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-10 Thread RaiMan
Question #680146 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680146 RaiMan posted a new comment: why so complicated? while(loopvalue > 0): if direction == 1: type(Key.RIGHT) elif direction == 2: type(Key.LEFT) elif direction == 3: type(Key.UP) elif direct

Re: [Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-10 Thread Melvin Raymond
Question #680146 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680146 Status: Answered => Solved Melvin Raymond confirmed that the question is solved: I figured it wouldn't be that easy to use the Dictionary way, and what you have shown here is pretty much what I ended up

Re: [Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-10 Thread RaiMan
Question #680146 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680146 Status: Open => Answered RaiMan proposed the following answer: why so complicated? this simple def will do: def move(direction, counter = 1): if direction < 1 or direction > 4: return # do

Re: [Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-09 Thread Melvin Raymond
Question #680146 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680146 Melvin Raymond gave more information on the question: I'm running this in SikuliX IDE by the way. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli.

[Sikuli-driver] [Question #680146]: How do I get multiple arguments into a class object that I can use in dictionary functions

2019-04-09 Thread Melvin Raymond
New question #680146 on Sikuli: https://answers.launchpad.net/sikuli/+question/680146 I don't know if I can even do this or not. I'm experimenting with a class object that "I think" is using a dictionary to simulate a switch statement in Jython/Python. I'm aware that Python doesn't have a switch