 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
[VxE]
Joined: 07 Oct 2006 Posts: 1494
|
Posted: Wed Apr 02, 2008 7:46 pm Post subject: |
|
|
Laszlo's last code is a demonstration of how you would two correlated lists, select data in the second list by referencing a value in the first, then clamp a value to only multiples of the selected value.
It may help if you gave us some idea of how the target application presents the 'predefined' information. Does it ever update? What action indicated an update? Things like that.
IIUC, a change in the text in editbox 1 signifies a new value in editbox 2, which is the value you'd like to use as a base for further input.
So perhaps: | Code: | SetTimer, WatchEditBoxes, 100
WatchEditBoxes:
IfWinNotActive, YOURWINDOWTITLE
return ; do nothing
ControlGetText, Duh, Edit1, A
If Duh = %Doh% ; there has been no change in the first edit field
return
Doh = %Duh% ; save the contents of the first edit field for determining if this field changes
ControlGetText, Donut, Edit1, A ; as soon as the first edit field changes, grab the value of the second field and save it
return
#IfWinActive, YOURWINDOWTITLE
$Enter::
$NumpadEnter::
SetFormat Float, 0.2
ControlGetText, Numb, Edit3, A
If Numb is Number
ControlSetText, Edit3, % Round(Numb*20)/20, A
ControlGetText, Numb, Edit2, A
If Numb is Number
ControlSetText, Edit2, % Round(Numb/Donut)*Donut, A
Send {Enter}
Return
#IfWinActive |
_________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Thu Apr 03, 2008 12:15 am Post subject: |
|
|
If you want to do both corrections at ENTER, try this (untested!): | Code: | N = ,ABC,DE,ABCD, ; EXAMPLE list of names with leading and trailing comma
Q = 75,209,144 ; EXAMPLE list of the corresponding numbers
StringSplit Q, Q, `,
SetFormat Float, 0.2
GroupAdd OrdersGroup, Buy Orders
GroupAdd OrdersGroup, Sell Orders
GroupAdd OrdersGroup, Outstanding Orders
#IfWinActive ahk_group OrdersGroup
$Enter::
$NumpadEnter::
ControlGetText S, Edit1, A ; get currently set name
ControlGetText T, Edit2, A ; get currently set amount
M := SubStr(N,1,InStr(N, "," . S . ","))
StringReplace M, M, `,, `,, UseErrorLevel
Q := Q%ErrorLevel% ; number corresponding to the active name
ControlSetText Edit2, % round(T/Q)*Q, A ; set corrected number
ControlGetText numb, Edit3, A
ControlSetText Edit3, % Round(numb*20)/20, A
Send {Enter}
Return
#IfWinActive |
|
|
| Back to top |
|
 |
Vik Guest
|
Posted: Thu Apr 03, 2008 3:01 pm Post subject: |
|
|
Brilliant! Laszlo, Absolutely perfect… Thank You so much. The script works just as intended except it has a few glitches (not in the code but in the way I would want it to function) which I hope can be sorted out. As I am still in the experimental stage of this script, the glitches given below are those I noticed today and if I come across any more I will post them here.
- In the code given above, I added the names of ten stocks besides N = and besides Q = I put in their corresponding numbers. The problem I face is that even for the stocks that are not defined besides N =, the code rounds them off resulting in an error. Can the code be modified so that it would work only on the stocks defined besides N = and for those that are not defined, the rounding off would not do anything.
- As mentioned earlier, I added the names of ten stocks besides N = and besides Q = I put in their corresponding numbers. The other problem I face is that the first nine stocks round off perfectly as desired except for the last one. As I kept adding new data to N =, only the last one did not round-off. Of course, I have resorted to the crude method of solving this problem by putting in a dummy stock name at the very end but if there is a better alternative, please let me know.
- Another issue I noticed with the rounding-off was – Say there is a stock JKL whose value is 50. If I were to input 45 or 65 it would round-off to 50. That works fine but if I were to input 10 it would round-off to zero. Is there anyway to predefine in the code that if the data in ClassNN Edit1 is JKL then the minimum value to be retained must be 50.
I wanted to know whether I can put unlimited amount of stock names besides N = and their corresponding numbers besides Q = or is there a limit? If there is a limit then is there a way to override that problem?
Thank you, [VxE] for your post. Now to try and answer the questions that you have asked. The target application presents the ‘predefined’ information as a part of the program – that is – If the data in ClassNN Edit1 is ABC then automatically the amount in ClassNN Edit2 will be 75. This is activated either pressing by the NumpadAdd key (to Buy) or the NumpadSub key (to Sell). In other words (giving the example that you want to Buy) if you are on the Touchline in stock ABC and would like to trade in it by pressing the NumpadAdd key, the information in ClassNN Edit1 would be ABC and the amount in ClassNN Edit2 will be 75. If you were to input an amount other than 75 or its multiples the system will not go ahead with accepting the transaction. Even if you would have typed any amount in the ClassNN Edit2, on pressing the NumpadAdd key the system will always revert back to the original amount of 75.
I do not know exactly what you mean by an update but assuming you are trying to ask whether the value in ClassNN Edit2 is frequently changed by the application – the answer is No as it will always stay 75.
I am trying to understand what you meant by - how you would in two correlated lists, select data in the second list by referencing a value in the first, then clamp a value to only multiples of the selected value. Are you trying to imply that if the application offers me a predefined value (which in this case it does) the code can pick-up that initial predefined value (from ClassNN Edit2) and then clamp the multiples of that selected value back in ClassNN Edit2. If that were to work then I reckon there would be no need to define values by N = and Q = as indicated in Laszlo’s code. The main thing to note here is that the code must pick-up, retain and work on the initial value as given by the application. Hence if it is ABC then it must round-off only in multiples of 75. At least by predefining the values by N = and Q = you are assured that the value and the multiples thereof cannot never go wrong but if a code can do away with this then it would also be great.
[VxE] has further mentioned - IIUC, a change in the text in editbox 1 signifies a new value in editbox 2, which is the value you'd like to use as a base for further input. Well I don’t know what IIUC stands for so it’s a bit difficult to understand the statement but the value for further input must be based on the initial value. Instead of monitoring the edit fields for changes it should grab the value as soon as either the NumpadAdd key or the NumpadSub key is pressed and retain that value and work on that value until either the Enter or NumpadEnter key is pressed.
Value all the help… |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Thu Apr 03, 2008 4:08 pm Post subject: |
|
|
The version below does not adjust the number of stocks if the name is not in list N, and keeps the number at least at the value in list Q | Code: | N = ,ABC,DE,ABCD, ; EXAMPLE list of names with leading and trailing comma
Q = 75,209,144 ; EXAMPLE list of the corresponding numbers
StringSplit Q, Q, `,
SetFormat Float, 0.2
GroupAdd OrdersGroup, Buy Orders
GroupAdd OrdersGroup, Sell Orders
GroupAdd OrdersGroup, Outstanding Orders
#IfWinActive ahk_group OrdersGroup
$Enter::
$NumpadEnter::
ControlGetText S, Edit1, A ; get currently set name
ControlGetText T, Edit2, A ; get currently set amount
M := SubStr(N,1,InStr(N, "," . S . ","))
If (M) { ; only if S is in list N
StringReplace M, M, `,, `,, UseErrorLevel
Q := Q%ErrorLevel% ; number corresponding to the active name
ControlSetText Edit2, % T<Q ? Q : round(T/Q)*Q, A ; set corrected number, at least Q
}
ControlGetText numb, Edit3, A
ControlSetText Edit3, % Round(numb*20)/20, A
Send {Enter}
Return
#IfWinActive |
The last stock name should work, too, unless you forgot the trailing comma in N. It is important, like the leading comma. |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1494
|
Posted: Fri Apr 04, 2008 2:35 am Post subject: |
|
|
Sry for my garbledygok typing. What I meant by that first line was just trying to explain what Laszlo's code does.
IIUC
The snippet I posted previously used a timer to 'watch' the first edit box for a change, thinking that a change in that box would signify a new value in the second box. Upon such a change, the timer would then allow the second value to be stored in a variable for later use as the multiple for a number that a user may have entered in that field.
If your data is known beforehand, you can organize it into lists (Laszlo's version), which will be more reliable than grabbing the starting value on-the-fly. There should be no limit to the number of names/numbers that you put in those lists, so long as you keep sure to match them one-to-one. _________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
Vik Guest
|
Posted: Fri Apr 04, 2008 7:05 pm Post subject: |
|
|
Laszlo, your code is the work of a pure genius. Thank You, Thank You, Thank You. It works brilliantly and just as intended. It solved all the above problems.
Now I needed your help to solve two more problems that I have noticed.
- I use this same code in a few computers and those which are new and fast the code works flawlessly but for those that are old and slow the code falters. Like for example the most evident flaw in a computer that is slow would be – When you initially press the NumpadAdd key, enter a value in the ClassNN Edit2 and then press the NumpadEnter key it does not round-off the value in the ClassNN Edit2. Thereafter if you go through the whole routine again, it does. Similarly, if the code has to round-off the value in both ClassNN Edit2 and ClassNN Edit3 it very often does it only in one ClassNN and cannot do both. This problem generally does not occur in a computer that is faster. I have also deployed this code on another software that runs on a single window environment. This application is quite old and though it is on windows it borrows most of DOS like attributes, which actually works better on older Windows versions rather than on WinXP etc. This above problem occurs most frequently on this application. On the other application it works effortlessly. I believe that the AHK commands SetBatchLines and / or SetControlDelay are used to slow things down for a code to work. Any suggestions whether these above commands or any other would help in rectifying the problem.
Please Note – Here, speed is the essence of the code so slowing the code down drastically would not make sense as it would mean that it would not function in real time thereby defeating the purpose of having the code. It should be slowed down only till the level that it works on all computers without sacrificing performance. I know I would need to experiment with the delay value as per the machine, which I will adjust accordingly but I need to know which AHK command to use and how.
- When I had posted this a few days ago, I had started by stating that depending on the value / data in ClassNN Edit1 the rounding off must be effected in ClassNN Edit2. The information in ClassNN Edit1 is variable and hence the code offered by Laszlo allows me to enter the predefined data for all the options and it has solved my query. Now I would like to know whether it would be possible to modify the above code so that along with the information in ClassNN Edit1, it also checks for data in ClassNN Edit7 before it executes it. The default value / data in ClassNN Edit7 will always be 999 and though it can be changed it would purely be unintentionally done in error.
This in other words means that if the value / data in ClassNN Edit7 is 999 and ClassNN Edit1 is ABC only then will the code in ClassNN Edit2 change multiples of 75. If the ClassNN Edit7 is 777 and if the ClassNN Edit1 if ABC the code will do nothing.
Thank you, [VxE] for clarifying your post. Agreed Laszlo’s code would produce more reliable results and once again hats off to him for such an efficient code but just out of curiosity – Is it possible to have a code that can actually grab the starting value on the fly and retain it by perhaps storing it in a variable or something and then work the multiples on that value only. Basically on pressing the NumpadAdd or NumpadSub key there would always be a predefined value in ClassNN Edit2 that needs to be captured and stored. The code has to then work the multiples only on that stored value regardless of what amount is thereafter entered in the ClassNN Edit2. If this is possible, I would truly appreciate a code for the same.
Value all the help… |
|
| Back to top |
|
 |
Vik Guest
|
Posted: Sat Apr 05, 2008 5:31 pm Post subject: |
|
|
Any chance of getting the above two problems solved???
And the possibility of a code that can grab the starting value on the fly and then work on that.
Please... |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Mon Apr 07, 2008 12:09 am Post subject: |
|
|
The speed issue: You can safely try SetControlDelay 100 or even more. It will insert a 100 ms delay after each control modification, so the overall resulting lag is less than half a second.
If it does not help, try to manually insert Sleep commands before and/or after the ControlSetText commands, to see if they make any difference. Sleep 50 should be plenty, but you can go up to Sleep 250.
I don’t understand how the default name should work. One possibility is to remember the last valid name entered to Edit1, or a preset default, if there was no valid name entered yet. Later, if Edit1 does not contain a valid name, use the stored default.
Try to tweak the code for your needs. If you want to experiment with the code, precede the Send {Enter} line with “MsgBox ”, so you can examine the result without actually affecting the stock handler program.
| Code: | #SingleInstance Force
#NoEnv
SetBatchLines -1
N = ,ABC,DE,ABCD, ; EXAMPLE list of names with leading and trailing comma
Q = 75,209,144 ; EXAMPLE list of the corresponding numbers
S0 = DE ; EXAMPLE default name
StringSplit Q, Q, `, ; create helper array of numbers
SetFormat Float, 0.2 ; 2 decimal places after the point
GroupAdd OrdersGroup, Buy Orders
GroupAdd OrdersGroup, Sell Orders ; group of windows of stock handler
GroupAdd OrdersGroup, Outstanding Orders
#IfWinActive ahk_group OrdersGroup ; hotkeys only for stock handler
$Enter::
$NumpadEnter::
ControlGetText S, Edit7, A ; get value
If S != 999 ; check if 999
Return ; if you want to skip to Label:, GoTo Label
ControlGetText S, Edit1, A ; get name
M := SubStr(N,1,InStr(N, "," . S . ",")) ; discard end of list from match
If (M = "") { ; empty: invalid or missing name
S := S0 ; set last/default name
ControlSetText Edit1, %S%, A ; show corrected name
M := SubStr(N,1,InStr(N, "," . S . ","))
}
S0 := S ; remember this name as last valid
StringReplace M, M, `,, `,,UseErrorLevel ; #commas in shortened list = position in list
Q := Q%ErrorLevel% ; number corresponding to the active name
ControlGetText T, Edit2, A ; get currently set amount
ControlSetText Edit2, % T<Q ? Q : round(T/Q)*Q, A ; set corrected number, at least Q
ControlGetText numb, Edit3, A ; get price
ControlSetText Edit3, % Round(numb*20)/20, A ; round price to a multiple of 0.05
Send {Enter} ; activate stock handler
Return
#IfWinActive ; following hotkeys are global |
|
|
| Back to top |
|
 |
Vik Guest
|
Posted: Mon Apr 07, 2008 7:21 pm Post subject: |
|
|
Thank you Laszlo for your code. I think I might not have explained the ClassNN Edit7 part quite clearly as Laszlo has written - I don’t understand how the default name should work. One possibility is to remember the last valid name entered to Edit1, or a preset default, if there was no valid name entered yet. Later, if Edit1 does not contain a valid name, use the stored default.
I am going to try and explain what modification I need in the code once again hoping that this time it makes more sense.
The thing is (for example) when the user presses either the NumpadAdd key (to Buy) or the NumpadSub key (to Sell) the value in ClassNN Edit1 would be ABC and the value in ClassNN Edit2 would be 75. Laszlo has given an excellent code above that works just as intended to round-off the value to multiples of 75 in ClassNN Edit3 under these circumstances. What I forgot to mention in my earlier query was that at the same time when the above values are reflected in their respective ClassNN Edit controls (Edit 1&2), the value in ClassNN Edit7 is 999A (sorry previously I wrote it is as only 999). The ClassNN Edit7 can also have other values such as 333Q, 555T etc. wherein the information in ClassNN Edit1 would still be ABC and in ClassNN Edit2 it would still be 75.
I would like this rounding-off to be effected only when the value in ClassNN Edit7 is 999A and not if the value is anything other than 999A. The code, under these circumstances when the information in ClassNN Edit7 is not 999A, should leave the value in ClassNN Edit2 just the way it is.
So, this in other words means that the working code as given by Laszlo on 3/Apr/2008 thus far checks for the value in ClassNN Edit1 and if it is ABC it rounds-off the value in ClassNN Edit2 to the nearest multiple of 75. If the value entered in ClassNN Edit2 is far lower (for example 15) it still retains the bare minimum value at 75. All of this works perfectly as per the code. The only modification I need to the above code is that before it does the rounding-off it must also check on the value in ClassNN Edit7 and only if it is 999A must it do exactly as per the code given by Laszlo on 3/Apr/2008; else it must do nothing to the value in ClassNN Edit2.
ClassNN Edit1 – ABC
ClassNN Edit7 – 999A
ClassNN Edit2 – 75
ClassNN Edit3 – Price
I hope a code can be given for this.
Also, as per the AHK help file the command options for ControlGetText and ControlSetText are –
ControlGetText, OutputVar [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlSetText, OutputVar [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
I have tried to understand the above command options from Laszlo’s code, for example he has given –
ControlGetText, S, Edit1, A
ControlGetText, T, Edit2, A
ControlSetText, Edit2, % T<Q ? Q : round(T/Q)*Q, A
ControlGetText, Numb, Edit3, A
ControlSetText, Edit3, % Round(numb*20)/20, A
I assume from the above S, T, Numb signify the OutputVar followed by the Control but what does the A signify? Plus, I would like to know if I can add the Active Window title at the end of this code. The WinTitle of the application where I would like to use this code is MOSTE. Does A signify the WinTitle and hence can be replaced by MOSTE? I could also do away with the GroupAdd commands and simply precede the Enter / NumpadEnter Hotkeys with #If WinActive, MOSTE as this works a little differently than the other software wherein I required having the WinTitles added as a Group. MOSTE is a single window environment that stays constant throughout.
The speed issue well still continues to be an issue. I experimented with a SetControlDelay of up to 1500 to no avail. What I have briefly noticed is that whilst the market is live and active trading is underway (that is when the computer is receiving and sending information rapidly) the code does not round-off as intended and on the same computer when the broadcast is idle, it does. I also wonder if it is a CPU related problem or some Process preference issue. I will experiment with the Sleep option tomorrow and see if it helps.
Thank you, and Value all the help… |
|
| Back to top |
|
 |
Vik Guest
|
Posted: Tue Apr 08, 2008 2:11 pm Post subject: |
|
|
There is a slight addendum to the above requirement. As mentioned in my previous post, I would like the code to round-off the value in the ClassNN Edit2, depending on the value in ClassNN Edit1 only when the value in ClassNN Edit7 is 999A. Actually, there is another instance also when the code must round-off the value just as above but the problem is that the value isn’t in an Edit field. The value is in a ComboBox. WinSpy shows it as ComboBox5. The value in this ComboBox5 varies between AA, C4 and ZZ. I would like the code to function for all these three values in the ComboBox. Whilst browsing through the AHK help file I read that to get the value from a ComboBox, the ControlGet command followed by various options needs to be used akin to the way ControlGetText gets the value from an Edit field. As this is a bit too tough for me, I wouldn’t know how to insert it in a code but I reckon it might work.
I did attempt using the code given by Laszlo on 7/Apr/2008 but it has a slight flaw. The code does round-off the value in ClassNN Edit2 only when the value in ClassNN Edit7 is 999A but it does nothing when the value in ClassNN Edit7 is something other than 999A. The requirement for the code is to at least proceed without rounding-off the value in ClassNN Edit2 but the Hotkey just does not send the Enter key.
Hence I need a code that would round-off in ClassNN Edit2 on both instances - if the value in ClassNN Edit7 is 999A or if the value in the ComboBox5 is either AA, C4 or ZZ. If either the value in ClassNN Edit7 or ComboBox5 is something else it should proceed with the typed in value in ClassNN Edit2 without altering it.
Value the help… |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Thu Apr 10, 2008 2:38 am Post subject: |
|
|
Sorry for the delayed answer.
“A” designates the Active window. You can have here the window title, too, but the hotkeys are only triggered when this application is active, so you gain nothing.
In #IfWinActive, instead of the AHK_Group, you can use the title of the application (MOSTE), with the proper SetTitleMatchMode.
The speed: it looks like the program updates or locks the controls, when there is Internet activity, and it conflicts with your code. You could try adding “Process, priority, , High” or even “Process, priority, , Realtime” to give the script priority, or temporarily disabling the web access, but it is more complicated.
“ControlGetText T, ComboBox5, A” should get the selected text. Try it as it is in the script below. If it does not, we have to try the more complicated “ControlGet List”, “ControlGet Selected” method.
| Code: | N = ,ABC,DE,ABCD, ; EXAMPLE list of names with leading and trailing comma
Q = 75,209,144 ; EXAMPLE list of the corresponding numbers
StringSplit Q, Q, `,
SetFormat Float, 0.2
GroupAdd OrdersGroup, Buy Orders
GroupAdd OrdersGroup, Sell Orders
GroupAdd OrdersGroup, Outstanding Orders
#IfWinActive ahk_group OrdersGroup
$Enter::
$NumpadEnter::
ControlGetText S, Edit7, A ; get value from Edit7
ControlGetText T, ComboBox5, A ; get value from ComboBox5
If (S = "999A" or T = "AA" or T = "C4" or T = "ZZ") {
ControlGetText S, Edit1, A ; get currently set name
ControlGetText T, Edit2, A ; get currently set amount
M := SubStr(N,1,InStr(N, "," . S . ","))
If (M) { ; only if S is in list N
StringReplace M, M, `,, `,, UseErrorLevel
Q := Q%ErrorLevel% ; number corresponding to the active name
ControlSetText Edit2, % T<Q ? Q : round(T/Q)*Q, A ; set corrected number, at least Q
}
}
ControlGetText numb, Edit3, A
ControlSetText Edit3, % Round(numb*20)/20, A
Send {Enter}
Return
#IfWinActive |
|
|
| Back to top |
|
 |
Vik Guest
|
Posted: Thu Apr 10, 2008 7:04 pm Post subject: |
|
|
Laszlo, I have said this before – you are a genius. I got your code just moments before I was leaving for the office so I haven’t done extensive testing on it but prima facie it seems to work exactly as I need it to from whatever little testing I could do today. The good news is that the ComboBox works with the ControlGetText command eradicating the need for the ControlGet List, ControlGet Selected commands. (At this juncture though, I would like to ask you for a sample code, if possible, using the ControlGet command as I do have another application wherein the ComboBox does not work with the ControlGetText command). Would either of these two be valid ControlGet commands to get the value from a ComboBox. Is this how it is written?
ControlGet, V, List, Choice, ComboBox1, STPA
ControlGet, V, List, Selected, ComboBox1, STPA
V is the OutputVar and STPA is the WinTitle.
Thank you for clarifying that “A” stands for the Active window. Ditto for the #IfWinActive along with the proper SetTitleMatchMode. I will now alter these parameters as per my needs.
Now the only issue that remains unsolved is the speed issue – To begin with, the application does not take in live feeds from the Internet but from the trading exchange server. As a matter of fact, there is no Internet connection for the trading computers. All computers of all traders across everywhere are connected to the exchange mainframe either via cable or satellite links (at least that is how I think it is ). I use a dedicated cable line and the speeds are fast – they ought to be / need to be - as refreshing stock prices plus order input and order deleting / modification amongst other functions have to be in real time. There is a continuous and rapid flow of to and fro data during trading hours. I have tried various avenues to make the code work like putting a Sleep in between; using ControlSetDelay, SetBatchLines, SetKeyDelay etc. but nothing seems to work. Also what does tend to happen at times is that the code would round-off in the Edit3 field but not in the Edit2 field when the rounding-off is required to be simultaneously done in both. I think anyways as per the code the rounding-off process is relatively quite quicker in the Edit3 field as compared to the Edit2 field. In the Edit2 field it has to check for stuff in the Edit1 field and get data from elsewhere (N & Q in the code) and then function whereas in the Edit3 field it’s quite straight forward. I welcome Laszlo’s suggestion to use the Process command and would appreciate an applicable code to implement it. If there are any other suggestions that could make this work it would be great. Ironically enough I do use another code that also uses the ControlGetText command that functions perfectly. I have assigned two hotkeys to the Left and Right keys. The code I am using is –
| Code: | #IfWinActive, MOSTE
$Left::
ControlGetFocus, CurrentControl
If (CurrentControl = "Edit3")
{
ControlGetText, FlowRate, %CurrentControl%, MOSTE
SetFormat, Float, 0.2
FlowRate += 0.5
ControlSetText, %CurrentControl%, %FlowRate%, MOSTE
}
Else
{
Send, {Left}
}
Return
#IfWinActive |
The code for the Right key is similar. I managed to script this code after browsing through this very forum and the reason I am giving this code above is just in case the code given by Laszlo needs to be altered in the hope that it might solve the speed issue, it could help. I do not have the expertise to tinker with Laszlo’s code so I haven’t attempted altering it.
If there are any other problems I will repost in a few days.
Value all the help… |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|