 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Aditi
Joined: 18 Aug 2009 Posts: 6
|
Posted: Wed Aug 19, 2009 9:29 am Post subject: |
|
|
| engunneer wrote: | yes, you can modify the tooltip commands to place them where you want.
You can also remove the SetTimerCommand, or otherwise modify the notifications you get. I encourage you to experiment with this a bit. You can use the 'test' version for experimenting, since it won't harm your real application.
If you need help modifying the tooltip, let me know, but the help file explains it pretty well. |
As advised, I changed a few lines in the code. I marked the lines that said SetTimer, ClearToolTip and then the ClearToolTip label and the ToolTip command that features once the file is executed with a ; to disable them. Under the F11 Hotkey, after the line ToolTip, Current Mode is %IncrementMode%, I added the code 800, 2 as the X and Y position of the tooltip and preceded that with CoordMode, ToolTip, Screen. These coordinates displays the Tooltip in the right hand corner of the screen and is permanently displayed there as the SetTimer, ClearToolTip lines of code have been disabled. I hope the 800, 2 coordinates would be the same (that is almost on the right hand side top corner) for all screens regardless of things like screen size, resolution and other stuff. This is more or less what I need and perhaps the best way that I could go about doing the same. If there is a better way, please advice.
| engunneer wrote: | | I also encourage you to learn what the proper flow of this script is, in the event you need to change it. I'll be happy to answer any technical question about why it does what it does. |
Currently I am basking in the happiness that your code works like a charm . I know there is a lot to learn from your script, especially for a rookie like me and will bear in mind your advice. Will definitely come back knocking here in case I need any technical questions answered.
| engunneer wrote: | | Lastly, you can get in the habit of pressing F11 twice, and it will show you the current mode. |
If I adopt the practice highlighted above to have the ToolTip permanently displayed on the right hand corner of the screen then I will skip this step. I also realized how the F12 Hotkey displays the currently-in-operation mode (more of a way to double check) – nice touch. I will probably adhere to the permanent display for now, keeping the F12 Hotkey code in mind; in case the permanently displayed ToolTip is found to be too distracting at a later stage.
| engunneer wrote: | | You can also use a GUI to display status, I just felt it wasn't needed right away. |
Now that would be a cool way of doing it but GUI is way above my head to even think about how to go about it. If you can once again spare me your valuable time and effort in getting this GUI done, it would be inviting, interesting and awesome.
| engunneer wrote: | | and yes, I had the byref in the wrong place. Its job in life is to make sure that the LoadNextFile function sends the new FileNumber back to the rest of the script, which was an earlier problem. Another problem was my initial setup of IncrementMode, where I used = instead of :=. That was a rookie mistake on my part. |
I can see the plethora of replies (effective working scripts) that you contribute to this forum and my estimated guess is that besides being a distinguished member of this forum you surely must be a moderator too (with over 7000 posts to your name, it would be foolish not to have you as one, unless you do not want that). A rookie mistake just goes to prove that you too are human at the end of the day.
I cannot say this enough – Thank You! Thank You! Thank You! for everything… |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 7698 Location: Germany (but I only speak English)
|
Posted: Wed Aug 19, 2009 10:05 am Post subject: |
|
|
800 will not always be the right place on every screen. If you replace the "800, 2" with "% A_ScreenWidth - 200, 2" (no quotes, though!), it should use the screen resolution to show the tooltip. The % means that this parameter (The X) is an expression, and the expression is the width of the screen (which AHK knows automatically) minus some number of your choosing.
Of course, you can change the messages, and the words 'Normal' and 'Reversed' to suit your needs.
It is even possible to have the Increment/Decrement words used, since the type of file is also known.
And yes, I am a moderator. Mostly to move posts to the right areas, but also to edit posts so that everything is in (code) blocks, or to fix formatting.
Most of my 7000+ posts are just answering peoples questions in the ask for help section. You will notice I post very little in the other forums. That is also how I learned AHK. I am good at certain types of scripts, but am bad at coming up with ideas for scripts. I don't even use AHK on a daily basis, and usually have no scripts running. _________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me. |
|
| Back to top |
|
 |
Aditi
Joined: 18 Aug 2009 Posts: 6
|
Posted: Wed Aug 19, 2009 2:40 pm Post subject: |
|
|
| engunneer wrote: | | 800 will not always be the right place… |
Amended the script with the % A_ScreenWidth - 200, 2 code - Thank You!
| engunneer wrote: | | Of course, you can change the messages, and the words 'Normal' and 'Reversed' to suit your needs. It is even possible to have the Increment/Decrement words used, since the type of file is also known. |
Actually I am now warming up to these words instead of Ascending and Descending, so I am going to stick to this
| engunneer wrote: | | And yes, I am a moderator… |
And a damn fine one at that – dedicated and gifted…
Just one query on the code – Agreed via the F11 Hotkey, I can switch modes but I wanted to ask you one thing on what I noticed. Say, I load the script and without first selecting any mode via the F11 Hotkey, the Buy side files start moving in a Reversed order and the Sell side files start moving in a Normal order. This in other words mean – I load the script, (do not choose any mode via the F11 Hotkey), press the F9 Hotkey, load file number 01.xls, execute it then the next one to auto-load is 20.xls. If I press the F10 Hotkey, load file number 01.xls, execute it then the next one to auto-load is 02.xls. Somehow, this seems to be the default – that is – without first assigning any order via the F11 Hotkey. Of course, if I press the F11 Hotkey and choose the Normal mode, the Buy side files move in an ascending order and the Sell side files move in a descending order.
Is it possible to change this “default” setting so that it would work the other way around from what it currently does, if the mode via the F11 Hotkey were not selected at first? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 7698 Location: Germany (but I only speak English)
|
Posted: Wed Aug 19, 2009 3:31 pm Post subject: |
|
|
it is set at the top of the script. Keep in mind that one of the changes I found as we moved through this topic is that I should have used := instead of = since my value was in Quotes. be sure you have the right one.
A little tinkering and you should be able to find it. _________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me. |
|
| Back to top |
|
 |
Aditi
Joined: 18 Aug 2009 Posts: 6
|
Posted: Thu Aug 20, 2009 10:12 am Post subject: |
|
|
| engunneer wrote: | | it is set at the top of the script. A little tinkering and you should be able to find it. |
Thank you, for pointing it out – I did tinker with it and have successfully managed
| engunneer wrote: | | Keep in mind that one of the changes I found as we moved through this topic is that I should have used := instead of = since my value was in Quotes. be sure you have the right one. |
Huh! I have no clue what you have just mentioned. Please bear in mind that all matters pertaining to AHK – you are like this PhD and I am still in Kindergarten. I have no clue what you have just highlighted. All I know is that in my opinion you have pulled a rabbit out of a hat with my script and it works exceeding well, so I do not know what you are cautioning me for.
Now my only quest would be to see some GUI design for this though it isn’t that necessary so you can do so only if you feel that you can spare the time for the same. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 7698 Location: Germany (but I only speak English)
|
Posted: Thu Aug 20, 2009 10:18 am Post subject: |
|
|
if the script is now loading in 'Normal' mode, then you don't need to worry about the := vs = distinction.
I still encourage you to learn about AHK, in case you need to adjust this script in the future. I often disappear from the forum for months at a time. _________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me. |
|
| 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
|