 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Retro Gamer Guest
|
Posted: Thu Mar 18, 2010 6:27 am Post subject: ..Need help with a date. |
|
|
..My script is mainly for work to make entering data over & over again shorter than if typing it all out over & over... Its pretty much a bunch of hotstrings together in one file. I have 2 main sections, 1 needing to work in only one window & the 2nd to work with a possible 3 or more different application windows.
So the 1st part goes something like this:
| Code: |
;=========================================
#IfWinActive Microsoft Access - DBReturnMail
;
;-----------------------------------------------------------------------------
; LETTER TYPE REPLACEMENT LIST
;
::14::,L0014
::15::,L0015
::26::,L0026
::27::,L0027 ; I WILL ADD MORE TYPES AS NEEDED
::28::,L0028
::34::,L0034
::66::,L0066
::67::,L0067
;
;-----------------------------------------------------------------------------
::NNA::NO NEW ADDY, SENT TO SAME{TAB}3/17/2010{TAB}JPG
::NAX::NEW ADDY PER DB2, LTR SENT{TAB}3/17/2010{TAB}JPG
::NAP::NEW ADDY PER DB1, LTR SENT{TAB}3/17/2010{TAB}JPG
::NMX::NEW ADDY PER DB1/DB2, LTR SENT{TAB}3/17/2010{TAB}JPG
;-----------------------------------------------------------------------------
;===========================================
|
2nd part of the script is like:
| Code: |
;===========================================
;-----------------------------------------------------------------------------
; I WANT THIS LIST ONLY TO WORK IN CIA INTERACTION MANAGER
; UNDER MSIE, CHROME, or FIREFOX.
;
;
;#IfWinActive Interaction Manager - Iron
#IfWinActive Interaction Manager - Maxthon Browser
;#IfWinActive Interaction Manager - Microsoft Internet Explorer
;
;-----------------------------------------------------------------------------
::NNA::NO NEW ADDY,{SPACE}SENT TO SAME{TAB}{RETURN}
::NAX::NEW ADDY PER DB2, LTR SENT{TAB}{RETURN}
::NAP::NEW ADDY PER DB1, LTR SENT{TAB}{RETURN}
::NMX::NEW ADDY PER DB1/MB2,{SPACE} LTR SENT{TAB}{RETURN}
;-----------------------------------------------------------------------------
;
;END
|
..If you look at the 2nd part you can see I have other browser app windows commented out. Depending on what PC I am using or APP I just uncomment the one I need & comment the rest. How can I make it work with multiple browsers at once with out me needing to do that? My other question I need help with is how can I get the current date to automatically be entered into my hotstrings without me Find/Replacing everyday before I start my work?? You can see the dates in the 1st part.
..It works as is, but I would like it to work smarter minus me doing the Find/Replace work too.. Thanks for any replies. |
|
| Back to top |
|
 |
Retro Gamer Guest
|
Posted: Thu Mar 18, 2010 6:32 am Post subject: Re: ..Need help with a date. |
|
|
..I tried making them into a group, but that only made the script not work at all with ANYTHING. Very frustrating...
| Retro Gamer wrote: | | ..If you look at the 2nd part you can see I have other browser app windows commented out. Depending on what PC I am using or APP I just uncomment the one I need & comment the rest. How can I make it work with multiple browsers at once with out me needing to do that? |
|
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 3254 Location: Simi Valley, CA
|
Posted: Thu Mar 18, 2010 7:01 am Post subject: |
|
|
When you use GroupAdd, you should put it near the top of your script (to make sure that they execute).
Alternatively, you can try SetTitleMatchMode, REGEX to give more precise control over the title matching behavior | Code: | ;#########################################
SetTitleMatchMode, Regex
;=========================================
#IfWinActive ^Microsoft Access - DBReturnMail
;
;-----------------------------------------------------------------------------
; LETTER TYPE REPLACEMENT LIST
;
::14::,L0014
::15::,L0015
::26::,L0026
::27::,L0027 ; I WILL ADD MORE TYPES AS NEEDED
::28::,L0028
::34::,L0034
::66::,L0066
::67::,L0067
;
;-----------------------------------------------------------------------------
::NNA::NO NEW ADDY, SENT TO SAME{TAB}3/17/2010{TAB}JPG
::NAX::NEW ADDY PER DB2, LTR SENT{TAB}3/17/2010{TAB}JPG
::NAP::NEW ADDY PER DB1, LTR SENT{TAB}3/17/2010{TAB}JPG
::NMX::NEW ADDY PER DB1/DB2, LTR SENT{TAB}3/17/2010{TAB}JPG
;-----------------------------------------------------------------------------
;===========================================
;===========================================
;-----------------------------------------------------------------------------
; I WANT THIS LIST ONLY TO WORK IN CIA INTERACTION MANAGER
; UNDER MSIE, CHROME, or FIREFOX.
;
;
;#IfWinActive Interaction Manager - Iron
;#IfWinActive Interaction Manager - Maxthon Browser
;#IfWinActive Interaction Manager - Microsoft Internet Explorer
#IfWinActive ^Interaction Manager - (Iron|Maxthon Browser|Microsoft Internet Explorer)
;
;-----------------------------------------------------------------------------
::NNA::NO NEW ADDY,{SPACE}SENT TO SAME{TAB}{RETURN}
::NAX::NEW ADDY PER DB2, LTR SENT{TAB}{RETURN}
::NAP::NEW ADDY PER DB1, LTR SENT{TAB}{RETURN}
::NMX::NEW ADDY PER DB1/MB2,{SPACE} LTR SENT{TAB}{RETURN}
;-----------------------------------------------------------------------------
;
;END |
_________________ Ternary (a ? b : c) guide TSV Table Manipulation Library
Post code inside [code][/code] tags! |
|
| Back to top |
|
 |
Retro Gamer Guest
|
Posted: Thu Mar 18, 2010 10:46 am Post subject: |
|
|
..Thank you [VxE] for the grouping help & pointers.  |
|
| Back to top |
|
 |
Laraptor
Joined: 29 Jan 2010 Posts: 41 Location: Decatur, AL
|
Posted: Thu Mar 18, 2010 2:29 pm Post subject: |
|
|
Getting the date for every day you can use this
| Code: | FormatTime, var1,YYYYMMDDHH24MISS, yyyyMMdd
var1 = %var1%
::NNA::NO NEW ADDY, SENT TO SAME{TAB}%var1%{TAB}JPG
::NAX::NEW ADDY PER DB2, LTR SENT{TAB}%var1%{TAB}JPG |
|
|
| Back to top |
|
 |
Retro Gamer Guest
|
Posted: Thu Mar 18, 2010 3:43 pm Post subject: |
|
|
[VxE]:
..I tried the the changes you suggested when I got to work this morning & they make my script not work in any of the browsers, access, or anything else. I had to take them out.
Laraptor:
..Thank you I will try that when I get a chance. |
|
| Back to top |
|
 |
Retro Gamer Guest
|
Posted: Thu Mar 18, 2010 4:01 pm Post subject: |
|
|
..Not sure what I am doing wrong here, but Laraptor's code just pastes %var1% into where the date should be.  |
|
| Back to top |
|
 |
Hitch Guest
|
Posted: Thu Mar 18, 2010 4:08 pm Post subject: |
|
|
| Quote: | | ..Need help with a date. | [ ]  |
|
| 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
|