| View previous topic :: View next topic |
| Author |
Message |
KGC Guest
|
Posted: Fri Nov 13, 2009 3:33 pm Post subject: Simple "If" condition problem |
|
|
| Quote: | AAA TY 676767 7679T767010267 56564 67675 6767 DT
Stringsplit,tah,clipboard,%A_Space%,
if tah8=DT
{
msgbox,NOWDT
} |
Why that code does not work.. what is the problem. the msgbox does not appear. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 1770 Location: MN, USA
|
Posted: Fri Nov 13, 2009 3:38 pm Post subject: |
|
|
It works for me (after putting the string on the clipboard of course). | Code: | clipboard = AAA TY 676767 7679T767010267 56564 67675 6767 DT
Stringsplit,tah,clipboard,%A_Space%,
if tah8=DT
{
msgbox,NOWDT
} |
_________________ http://autohotkey.net/~jaco0646/ |
|
| Back to top |
|
 |
KGC Guest
|
Posted: Fri Nov 13, 2009 3:49 pm Post subject: |
|
|
| Allright i have copy the text to clipboard from an excel cell and it contains formulas.May this effect the problem? How can i fix it? |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 940 Location: Germany - Deutschland
|
Posted: Fri Nov 13, 2009 4:00 pm Post subject: |
|
|
Try:
| Code: | clipboard = AAA TY 676767 7679T767010267 56564 67675 6767 DT
Stringsplit,tah,clipboard,%A_Space%%A_TAB%,
if tah8=DT
{
msgbox,NOWDT
} |
I think the delimiter is not a Space, perhaps a Tab. |
|
| Back to top |
|
 |
KGC Guest
|
Posted: Fri Nov 13, 2009 4:12 pm Post subject: |
|
|
| Code: | clipboard = AAA TY 676767 7679T767010267 56564 67675 6767 888
Stringsplit,tah,clipboard,%A_Space%,
if tah8=888
{
msgbox,NOWDT
} |
Above code does not work too. How can i test if ahk calculate 888? |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 940 Location: Germany - Deutschland
|
Posted: Fri Nov 13, 2009 4:35 pm Post subject: |
|
|
| Code: | Loop, %tah0%
MsgBox % tah%A_INDEX% |
|
|
| Back to top |
|
 |
|