 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
DJAnonimo
Joined: 10 Sep 2006 Posts: 145
|
Posted: Tue Mar 25, 2008 1:15 am Post subject: Really strange, proably bug.... |
|
|
Hi,
i just found a strange situation, look the code:
| Code: | IfExist, con.ini
{
Msgbox con.ini exist? Where?
} |
|
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 618 Location: Florida
|
Posted: Tue Mar 25, 2008 1:31 am Post subject: |
|
|
| MsgBox wrote: | ---------------------------
scratch.ahk
---------------------------
con.ini exist? Where?
---------------------------
OK
--------------------------- | What are you trying to do? _________________
 |
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 145
|
Posted: Tue Mar 25, 2008 1:59 am Post subject: |
|
|
hmm, i want to check if the file exist or not.
and it says that the file exist, but it doesn't.
try yourself |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 753 Location: London, UK
|
Posted: Tue Mar 25, 2008 2:07 am Post subject: |
|
|
This works too,
| Code: | IfExist, con.sdfsdfsdfsdfsdf
{
Msgbox con.ini exist? Where?
} |
It shouldnt :S _________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 485
|
Posted: Tue Mar 25, 2008 2:17 am Post subject: |
|
|
It does this because the con file is alwasy present.
It stands for console
Go to your desktop and make a folder or file with the name of con.
It will say its already there.
Any extension doesnt matter.
So no this is not a bug _________________ check out my site
www.eliteknifesquad.com
 |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Tue Mar 25, 2008 3:21 am Post subject: |
|
|
| Code: | DllCall("AllocConsole")
ifExist nul
FileAppend, nul exists... o_O`n, con.ini
FileAppend, Press Enter to exit., con.foo
FileReadLine, l, con.rawr!, 1 |
Btw, it's a documented Windows feature: Naming a File.
| Quote: | | Do not use the following reserved device names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension, for example, NUL.tx7. |
|
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 379 Location: Berlin
|
Posted: Tue Apr 01, 2008 10:19 pm Post subject: |
|
|
| Code: | DllCall("AllocConsole")
fileappend, test`n, con
FileAppend, Press Enter to exit., con
FileReadLine, l, con, 1 |
Lexikos, wow thx! You showed me a way how to write console like programs with AutoHotkey. I will search and read more about that. Is the stdin working with con? For example with pipes. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Wed Apr 02, 2008 1:48 am Post subject: |
|
|
| No, CON, CONIN$ and CONOUT$ access the console, even if StdIn and StdOut have been redirected. |
|
| 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
|