<div dir="ltr">Hello Lloyd, <div><br></div><div>thanks for your reply. I see I am asking wrong (mouse vs cursor, and maybe it is not pyqt thing). I followed this code (nothing to do with pyqt) if somebody need it too. Thanks for directing me the right way</div>
<div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804800033569336px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">import</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ctypes
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">import</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> random
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">import</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> time
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">import</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> math
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">def</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> move_mouse</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">):</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
x_pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> y_pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> pos
screen_size </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ctypes</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">windll</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">user32</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">GetSystemMetrics</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ctypes</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">windll</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">user32</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">GetSystemMetrics</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
x </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">65536L</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> x_pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> screen_size</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
y </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">65536L</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> y_pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> screen_size</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">return</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ctypes</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">windll</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">user32</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">mouse_event</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">32769</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> x</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> y</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">def</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> random_movement</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">top_left_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> bottom_right_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> min_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">100</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> max_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">200</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">):</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">'''speed is in pixels per second'''</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
x_bound </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> top_left_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">],</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> bottom_right_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
y_bound </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> top_left_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">],</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> bottom_right_corner</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">randrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">x_bound</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">randrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">y_bound</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">))</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
speed </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> min_speed </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">()*(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">max_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
direction </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">2</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pi</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">()</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">def</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> get_new_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> max_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> delta</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0.01</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">):</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
new_val </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> val </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">randrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">2</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">max_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">delta
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">if</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> new_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"><</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_val </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">or</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> new_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">></span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">max_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">:</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">return</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> get_new_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> max_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> delta</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">return</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> new_val
steps_per_second </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">35.0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">while</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">True</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">:</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
move_mouse</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
time</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">sleep</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1.0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">steps_per_second</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
speed </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> get_new_val</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">min_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> max_speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
direction</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">randrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">2</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pi</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">5.0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">()</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
new_pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">int</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">round</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">cos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">direction</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">steps_per_second</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
int</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">round</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">sin</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">direction</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">steps_per_second</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)))</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">while</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> new_pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">not</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">in</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> xrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">x_bound</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">or</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> new_pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">not</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">in</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> xrange</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">y_bound</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">):</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
direction </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">2</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pi</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">()</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
new_pos </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">int</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">round</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">cos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">direction</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">steps_per_second</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
int</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">round</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">speed</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">math</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">sin</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">direction</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">steps_per_second</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)))</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
pos</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">new_pos</span></code></pre>
<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.804800033569336px">
Example:</p><pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804800033569336px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">random_movement</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">((</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">300</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">300</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">),(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">600</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">600</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">))</span></code></pre>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-01 16:43 GMT+02:00 lloyd konneker <span dir="ltr"><<a href="mailto:bootch@nc.rr.com" target="_blank">bootch@nc.rr.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You are asking to move the cursor (a viewed thing), not the mouse, which is a pointing device (a control.)<br>
<br>
Generally, in a GUI you should not move the cursor except to follow the mouse. If you move the cursor in response to a mouseMoveEvent, it would be smooth.<br>
<br>
If you really want to move the cursor independently of the mouse, is your question about line drawing algorithms, not PyQt?<br>
______________________________<u></u>_________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.<u></u>com/mailman/listinfo/pyqt</a><br>
</blockquote></div><br></div>