Sign in to follow this  
Followers 0
Bongodog

Windows XP is interupting my script ~ computer locked

5 posts in this topic

New_AutoIt_v3_Script__6_.au3Heya.. I am new to scripting and am having a problem.

Have limited scripting tools knowledge but good intuitive skills

regarding computers. Am willing to put in the time to gain the needed

familiarity and skill to be a good script producer.

Have been using the recorder feature initially to analyse scripting functions

and have written a program to automate a function I need to perform.

My problem is that I can run the program once and it works fine..

but in rerunning the program a second time, my computer locks up

and goes into "computer locked" mode and I have to control-alt-delete

and enter my passowrd to get back in.

I am using windows xp and the beta program.

The script is simple.. i am starting off by going to the start button,

moving to Run, deleting what is held in memory on run, entering a

script to identify what program I want to open, opening the program,

performing an update function, coping files from one page to another,

resaving the file, and then closing the file. I am using mousemove

locations and mouse click functions to accomplish my task.

The problem is that when i rerun the program, after the script deletes the

previous run address, and is in the process of filling in the new address,

XP or a security program is interupting my program and sending me into

"computer locked" by the adminstrator mode.

Can anyone tell me why and what to do about it.

Also, is there a simpler way to simply open an excel document without

having to resort to the run function accompanied by filling in the address?

Obviously would be more direct etc..

and many of the commands I am using by mouse clicks are also control

code commands.. could probably simply type in the commands but have

not yet figured that out. Is there an explanation book on the subject..

Love the program and the possibilites of it.. am willing to stumble around

indefinitely to gain the value of the functions.

A copy of the script is attached..

Best regards to all..

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Opt("WinWaitDelay",100)
 Opt("WinTitleMatchMode",4)
 Opt("WinDetectHiddenText",1)
 Opt("MouseCoordMode",0)
 Run(@ComSpec & " /c " & '"' & "c:\documents and settings\crowderr.rory\desktop\market illustrations\sample stock report graphics\master template\master ss\251-500.xls" & "'", '"' & "c:\documents and settings\crowderr.rory\desktop\market illustrations\sample stock report graphics\master template\master ss\" & "'", @SW_HIDE)

This is to open the Excel document. It should work, just make sure that the path is entered correctly.

Edited by sheckandar

Live and Learn, 'cause Knowledge is Super Power.

Share this post


Link to post
Share on other sites

A locked desktop does not allow active desktop actions. This means WinWaitActive, WinActivate, WinActive, Send and Mouse* functions will fail to operate correctly while the desktop is locked.

You may want to check out one of the ExcelCom.au3 available in the Examples Forum.

;)

Share this post


Link to post
Share on other sites

Also, is there a simpler way to simply open an excel document without

having to resort to the run function accompanied by filling in the address?

Obviously would be more direct etc..

Simpler and more direct would be to use COM to control Excel, but if you're just beginning that will take some time to learn. Search for the word COM in the AutoIt help file.

You could use either of the Excel COM libraries created by myself or Randallc in the meantime.

Here's Randallc's library:

http://www.autoitscript.com/forum/index.php?showtopic=14166

And mine can be reached by clicking on the link in my signature.

Right now, Randallc's library has more help & examples for you to follow along with. Mine is still in what I'd call an introductory stage.

-S


(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]

Share this post


Link to post
Share on other sites

Thanks for all of the help.. I really appreciate the responses.. plenty of

food for thought and a lot of work that you folks have done. my absolute

appreciation!

Best,

Bongodog

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