Jump to content

Recommended Posts

  • Administrators
Posted

Updated /unstable/

Added JP's funky Dim changes

Also an updated Window Spy that gives the class names and control names used in the new TitleMatchModes. Oh, and I've added a hotkey to the window spy so that if you press CTRL+ALT+F it freezes the window so that you can more easily copy/paste control/pixel stuff.

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Administrators
Posted

Ok, I've made some massive Send() ControlSend() internal changes.

- The SendKeyDelay/SendKeyDownDelays should now be way more accurate. Before I was using a Sleep() function to wait for the required number of ms, but the resolution under 95/NT is not very good, so a Sleep(1) could be the same as a much bigger number. So what I've done is a Sleep(0) which is special, if just gives up the rest of AutoIt's timeslice, or if no other threads are waiting it just returns immediately. Then I use the high resolution performance counters to do a custom "sleep".

Something to note is when doing a long string of Send()s the CPU usage will show 100% - this isn't really the case as if any other thread is running the Sleep(0) will allow them to run. If my understanding of this is incorrect then let me know and we'll try something else. I'll go and test in a game in a moment to confirm. (Edit: seems fine I was sending 100s of keys and the game ran with no probs)

- SendKeyDelay default now 5, SendKeyDownDelay is 1. Anything less than 1 for KeyDownDelay starts to make ControlSend() less reliable. Under NT4/9x where this is worse a value of 1 is forced during ControlSend()

- I've changed the RAW mode of ControlSend() - all the other Send() related functions rely on pressing the modifier (shift, etc) keys to get text sent in the correct case. As you can see from above ControlSend is particularly fussy and was hard to get working under multiple OSes. The new RAW mode of ControlSend bypasses all that sort of stuff and sends actual character codes to the control bypassing the message/translation loop - it should be 100% accurate under all situations and under XP/2000 can even send some of JP's accented characters.

The reliablity order of send related functions is (from highest to lowest)

1. ControlSetText

2. ControlSend (RAW mode)

3. Send() (either mode)

4. ControlSend (non-RAW mode)

If using ControlSend (non-RAW) with characters that don't require SHIFT,CTRL, etc then it's just as reliable as the RAW mode.

  • Administrators
Posted

Updated again.

1. TrayIconDebug option - thanks JP

2. Some more directory macros (Jeremy)

I've changed the SendKeys/ControlSend stuff again. :whistle:

First big change is that I no longer turn off the capslock key at the start of a send command - which means I don't have to turn it on again at the end and is one less thing to go wrong. BUT. This is based upon an assumption about lower/upper case characters and Capslock/Shift. I'm using "language aware" APIs to test if a letter is upper/lower case (or no case at all) so it _should_ be fine. But if there are any language related problems then I'll have to change it back. JP will be able to test the French keys and I'm sure Valery will report any problems on a Russian keyboard.

ControlSend completely re-written. Previously it used a combination of physical keypresses for "modifiers" like shift, ctrl, alt, and then direct WM_KEY messages for everything else. I wasn't happy with the reliability and every so often they seemed to get out of sync and you would end up with case problems (usually under 9x, but seen it once under XP). No physical presses are made any more and it seems rock solid on 95, ME, NT4 and XP (so far....) B)

I've worked out what the problem with JP's accented chars is. All the MS APIs related to sending keys rely on the fact that every character can be sent with a single key or a single key plus a modifier (ctrl,alt, shift). The accented characters don't work like this. You press a ^ key (doesn't exist on US keyboards, it is to the right of P) then release it, and THEN type the key you want accented (or something like that). I can't think of a simple way to get this sort of thing to work. Not in a language independent way anyhow. :postal:

Posted

Thanks for trying to solve the accents. But as I understand no success.

When I need to solve that under AutoIt V2 I was using the copy/paste ^c/^v

in this case the receiving windows get the accents.

Posted (edited)

- Added: #comments-start and #comments-end for multiline comments

-Added: Macros: @USERPROFILEDIR, @HOMEDRIVE, @HOMEPATH, @HOMESHARE, @LOGONSERVER, @LOGONDOMAIN, @LOGONDNSDOMAIN

and others...

Wow! Au3 it continues being super!

Thanks, Jon and Devs. for add these fns and others. B)

Although I mean that when writing with this version, I see that the

function of commentaries, I only would suggest, a most short name, eg.:

#coms-start / #coms-end ....or

#rem-start / #rem-end

(for easy and quick when writing scripts) or anything... :whistle:

But of all ways, it's cool! :angry:

thanks.

Edited by josbe
Posted

Wow! Au3 it continues being super!

Thanks, Jon and Devs. for add these fns and others. :angry:

Although I mean that when writing with this version, I see that the

function of commentaries, I only would suggest, a most short name, eg.:

(for easy and quick when writing scripts) or anything... :whistle:

But of all ways, it's cool!  :evil:

thanks.

Thanks from a Dev guy

You certainly miss the AutoItSetOption("TrayIconDebug",1) and the StringFormat and ... B)

Posted

Also an updated Window Spy that gives the class names and control names used in the new TitleMatchModes.  Oh, and I've added a hotkey to the window spy so that if you press CTRL+ALT+F it freezes the window so that you can more easily copy/paste control/pixel stuff.

Awesome :whistle:B):angry:
  • Administrators
Posted

Although I mean that when writing with this version, I see that the

function of commentaries, I only would suggest, a most short name, eg.:

(for easy and quick when writing scripts) or anything... :whistle:

I'll change it so that you can use either #comments-start or #cs, #comments-end or #ce

A useful trick I've already used is that you can comment out comments. B)

;#comments-start

  • Administrators
Posted

http://www.hiddensoft.com/autoit3/files/unstable/

Updated:

- can use #cs and #ce as short versions of #comments-start/end

- Less sanity checking done on controls - report any craziness

- ControlLeftClick changed to ControlClick with extra button/clicks options

- Misc help updates

Posted

Updated:

Dec()

Added a description of the installation directory files.

(Valik, I ended up using a 10-liner - I think the base conversion stuff you subbed was a bit overkill :whistle: )

That's cool. I'm glad I made the changes to that code either way. It's long needed an overhaul. It was some of the first code I ever wrote that worked, but I managed to both improve it and reduce the amount of code involved with this rewrite, so I'm happy. The program it served as a backend to was in MFC, but I would rather it not use MFC, so perhaps rewriting the backend will spur me to port it back to using just the Windows API directly.

Jon, I have a GetMemoryStats function to send you. It's very simple, 1 API call and it returns an array with a bunch of information about the systems memory. If all goes well with the shipping of my processor/motherboard, I can send it tomorrow sometime (Err, Thursday, since its already tomrrow in England...). Does it have time to make it before the code freeze or you want me to hold it back for now?

  • Administrators
Posted

Updated:

3.0.92 (5th Feb, 2004)

Note: Script breaking changes to ControlLeftClick() and FileFindFirstFile()

- Removed: SendCapslockStoreMode (AutoItSetOption)

- Removed: SendSetCapslockState() - Use Send("{CAPSLOCK on/off}")

- Changed: FileFind works differently (handles used and multiple finds now supported)

- Changed: ControlLeftClick() renamed to ControlClick() and options added.

- Fixed: Hotkeys were ignored while another hotkey function was running

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...