Jump to content
Sign in to follow this  
TheMaster

Problem when using script inside a window

Recommended Posts

TheMaster

Okay so this is the Code Im using

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

While 1
        Send("{R}") ; Send the R key
        Sleep(5000) ; 
Wend
-----------------------------------------------
 
 
Simple right?
 
Now In one computer, Windows XP, this will run inside the a Word, and inside an application.
 
In the other computer, a laptop, bootcamp Winows 7 professional, it will run inside a Word document, but when I try to make it work inside the application, nothing happens.
 
Any idea what could be causing this problem?

Share this post


Link to post
Share on other sites
careca

Maybe the application doesn't have the focus.

It'll write where it has focus, just as it does when you press the key yourself.

But i guess you know that, can't think of anything else right now..

EDIT: Send('R') works too, have you tried that?

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
TheMaster

It does have the focus. It's just weird brcause the same thing in the other computer works..

Share this post


Link to post
Share on other sites
Melba23

TheMaster,

And just what is the other "application"? :huh:

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
232showtime

 

Okay so this is the Code Im using

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

While 1
        Send("{R}") ; Send the R key
        Sleep(5000) ; 
Wend
-----------------------------------------------
 
 
Simple right?
 
Now In one computer, Windows XP, this will run inside the a Word, and inside an application.
 
In the other computer, a laptop, bootcamp Winows 7 professional, it will run inside a Word document, but when I try to make it work inside the application, nothing happens.
 
Any idea what could be causing this problem?

 

because maybe you are automating a game that has a gameguard or protection that blocks script, like controlsend and send func,


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
JLogan3o13

232showtime, it is a sign of common sense on this forum that, when a Moderator steps into a thread to ask a question, you take that as a sign to stay out of it ;)

Edited by JLogan3o13
  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
232showtime

I know but admin has not post yet when I was writing my comment here, maybe my connection is too slow... pardon me... o:) o:) o:)

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
JLogan3o13

Really, a difference of more than 2 hours. What is your connection, tin cans and a string?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
232showtime

sorry but my internet is kinda slow im just using mobile hotspot, and signal here most of the time is too bad. so when im trying to post something and my internet got cut off suddenly i will just switch tab and watch movie until my my connection will become good again then switch back to forum, browse and read some new topics and switch back again to movie thats it... :sorcerer: :sorcerer: :sorcerer:

EDIT: hope you understand my current situation... :ILA: :ILA: :ILA:

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
TheMaster

1. If it works on one computer, then it's not that the application is protected

2. Any other script will work on my home computer with that application, it's something with the laptop that's wrong

I read a post of a guy saying he solved a similar problem by:

1. Compiling the script

2. Running the .exe as admin

When I run the exe I get "unable to open the script file error though"

I thought you gave help, not accusations :(

Thanks for those who already tried, a little idea could be the solution,

Not having this script is taking a toll on my hands T.T

Share this post


Link to post
Share on other sites
Melba23

TheMaster,

I asked you a question:

And just what is the other "application"? :huh:

On this forum if a Mod asks a question it is a good idea to reply. ;)

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
TheMaster

It's a database application we use to register client info, there are some repetitive tasks that have to be done to open a client file and I wondered if autoit could do them (It can, with mouseclick coordinates, etc.)

Problem is I can't get it to work in the laptop for some reason, and now im on vacation so it sucks (Yeah I still do some work on vacations..)

Share this post


Link to post
Share on other sites
Melba23

TheMaster,

Fine - that was not so difficult, was it? ;)

Any differences between the XP machine and the laptop other than the OS? Different AV, for example? :huh:

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
TheMaster

I dont know what AV stands for.. Autoit?

Downloaded both from official site.

Any idea what's causing the .exe error? I think thats a good lead since one guy solved the problem by running the compiled as admin. (Not sure if it was caused by the same thing)

Share this post


Link to post
Share on other sites
JLogan3o13

Anti-virus. We are trying to figure out what is different between the two machines. Is one x86 and the other x64, does one have different antivirus, etc. etc. etc.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
TheMaster

Avast on both, hmm I'll try deactivating it and see if it runs now when I hop off the train.

I dont think it's that tho, would it run in the word if it was?

Will try anyway just in case

Share this post


Link to post
Share on other sites
TheMaster

Tried without antivirus

Got the error ''Cant open the script file'' again, when trying to run the compiled .exe as administrator.

Any idea how to solve that error or what can cause it?

 

Any idea on what the window problem can be? (Just in case the .exe fix ends up not working

Share this post


Link to post
Share on other sites
Jos

Tried without antivirus

Got the error ''Cant open the script file'' again, when trying to run the compiled .exe as administrator.

Any idea how to solve that error or what can cause it?

 

Any idea on what the window problem can be? (Just in case the .exe fix ends up not working

Have you first recompiled the script?


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

Share this post


Link to post
Share on other sites
TheMaster

Yes, deleted the .exe file and compiled again

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  

×