Sign in to follow this  
Followers 0
KinesongPayaso

Isolating the problem

8 posts in this topic

#1 ·  Posted (edited)

I made a script that has worked on another machine flawlessly(worked fine on XP)

When I tried it on another machine(win7) I thought it didnt work on the intended software/application.

I tried to disable User Access Control, thinking it put a barrier between the script and sw/app ; I also tried window mode ; checked bug/reports in this forum, etc

One day, I forgot to turn off my script on the win7 machine, and while browsing the net, I noticed my keys were acting weirdly. Apparently, my script was functioning properly on my win7 machine, it was sending the proper keystrokes on my browser. I realized then, that win7 wasn't the problem

A day after that, I went back to my winXP machine, and tried the same script, on the same software/app ... the script works still.

I decided to make a new script from scratch for my win7 machine, that wasn't copied from the winXP, thinking that would solve it. It didnt

Now, Im boggled once again. I now have no idea what's causing the block.

winXP+ old script = OK

win7 + old script = OK on browsers, but not the intended software/app

win7 + new script = OK on browsers, but not the intended software/app

winXP+ new script = OK

From what I've done, Im guessing that there's no single culprit that's causing all this. win 7, autoIT and the sw/app are all contributory factors

FYI, the script contains basic commands(sleeps and sends)

Edited by KinesongPayaso

Share this post


Link to post
Share on other sites



KinesongPayaso,

Welcome to the AutoIt forum. ;)

As my crystal ball is in for repair, could you please post the troublesome code - it is a bit difficult to help without it. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There's not much to it. They're all just simple scripts..

Here's two of them(picked randomly)

::::::::::::::::::::FILENAME: sevenFiveOne.au3:::::::::::::::::::::::

HotKeySet("{END}", "Terminate")

While 1

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(100)

Send("{Down}")

Sleep(100)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(100)

Send("{7}")

Sleep(600)

Send("{5}")

Sleep(100)

Send("{Enter}")

Sleep(600)

Send("{Enter}")

Sleep(600)

Send("{Enter}")

Sleep(100)

Send("{1}")

Sleep(100)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{Enter}")

Sleep(60)

Send("{END}")

Sleep ( 50 )

Wend

;;;; Exit Function ;;;;

Func Terminate()

Exit 0

EndFunc

::::::::::::::::::::::::::::::::::::::;;run751::::::::::::::::::::::::: <<-- runs the above code/file sevenFiveOne.au3

HotKeySet("{Home}", "RunMe")

Global $pid = 0

;;;; Main Loop ;;;;

While 1

Sleep(500)

WEnd

Func RunME()

If ProcessExists($pid) = 0 Then

$pid = Run('AutoIt3.exe "sevenFiveOne.au3"')

EndIf

EndFunc

:::::::::::::::second file/code ... seperate from the above ... this has a starter too, but I didnt include it anymore::::::::

HotKeySet("{END}", "Terminate")

Global $pid = 0

HotKeySet("{w}", "filer")

HotKeySet("{x}", "zicFold")

func filer()

sleep(50)

send("{e}")

sleep(50)

send("{r}")

endfunc

func zicFold()

send("{s}")

sleep(50)

send("{c}")

sleep(50)

send("{z}")

endfunc

Func Terminate()

Exit 0

EndFunc

::::::::::::FYI, I dont run these files at the same time, which is why I left the global pID at 0.

I just open the "starter file" and it will activate the second file(by pressing the activation key, --HOME, in this case), which contains the main script/code. They terminate with the END button.

Edited by KinesongPayaso

Share this post


Link to post
Share on other sites

The forum disabled the Edit function(guess theres a 10-15 minute limit)

Here's what I added to that previous post (sorry for the double post)

------------------------------------

------------------------------------

------------------------------------

I've already submitted this issue to the software/app's owner; but he's notorious for not responding to emails/messages --he's doing other projects I think -- which is why I came here for help instead

I've already lengthened and shortened the duration of the sleeps -- still no go

I've already changed the de/activation keys (used buttons other than Home, End, Mwheelup/down, etc)

---

One thing to note though; certain functions* work properly in the sw/app's window -- it's just the --SENDING/Issuing-- of commands that do not work

* Functions that --RETRIEVE-- info, and produce a pop up window that reports findings

for example, the progress bar for file transfer progress is green(completed work), and white for unworked/to be transferred

If I use a pixel retrieval script, it returns the white or green accurately

Share this post


Link to post
Share on other sites

The forum disabled the Edit function(guess theres a 10-15 minute limit)

There are limitations for new member below the 10 posts.

What are these scripts used for?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

KinesongPayaso,

In future when you post code please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). It makes it much easier to read. :)

The only unusual thing I can see about the code you posted is that you enclose normal keys in { } - you only need those when you Send "special" keys like {ENTER}. However, if it works on XP.....

What is this app that you are trying to Send to? ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

oh ok

I used

the quote code

but they didnt work

......edit::: now they work. wierd

Ill use [autoit] next time

It's a sort of a file DB manager that was done by a frat of students before. Not sure If im allowed to post pics of it, or mention the name

It takes a text file or memo, laces it with another message or a "stamp", saves it to a destination folder that you can't access, and reverts the original memo to it's old state(unchanged, in its original location). idk why they didnt just make a duplicate of the original file, and changed the duplicate.

The buttons that my script sends are the first few letters of folders/files names

The "filer" function waits for a pop up, then i press 'w', and of the many folders/files there, it will select folders/files that start with W,E,R,*

Same goes for the "zicFold" function. X,S,C,Z

The sevenFiveOne file, waits for multiple pop ups(during the sleep(60)s) and the send("{Enter}") just answers the confirmation pop ups"are you sure? y/n" I've got a lot of variations for the sevenFiveOne file, since they apply to various memos or stamps

Edited by KinesongPayaso

Share this post


Link to post
Share on other sites

Use the Au3Info.exe (Ctrl+F6 in SciTE4AutoIt) on the program to check if you can identify any of the controls you use. If so, you can use ControlSend and other Control...() functions to automate the process in a much more reliable way.

Share this post


Link to post
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
Sign in to follow this  
Followers 0