AutoHotkey Community

It is currently May 27th, 2012, 6:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: August 28th, 2011, 3:14 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
I am using version 1.1.0.0 (01. May 2011). I have also tried it with the newest version and the new Ahk2Exe, but it doesn't work either.
Could you try to compile the script and check whether I do something wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2011, 4:14 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
edit


Last edited by hughman on August 30th, 2011, 5:26 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2011, 4:20 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
I found a very strange problem:
if existing function whose name starts with some specific words such as "xml" in the script, then WatchDirectory can't report changes any more.
In order to find the bug I have spent so much time :( But I can't understand the reason, can you help me?
Below is my test code:
Code:
#Persistent
SetBatchLines,-1
SetWinDelay,-1
OnExit, @OnExit

WatchDirectory("g:\Develop\SQD\tmp", "ReportDirectoryChanges")
Return

Esc::
@OnExit:
   WatchDirectory("")
ExitApp

ReportDirectoryChanges(fromFile, toFile)
{
   MsgBox F:%fromFile%`nT:%toFile%
}

xml()
 {
 }


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2011, 8:52 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
flashkid wrote:
I am using version 1.1.0.0 (01. May 2011). I have also tried it with the newest version and the new Ahk2Exe, but it doesn't work either.
Could you try to compile the script and check whether I do something wrong?
Can you try newest version ( also new _Struct() version).
Also try compiling 1.1.2.03 using new compiler.

hughman wrote:
I found a very strange problem:
if existing function whose name starts with some specific words such as "xml" in the script, then WatchDirectory can't report changes any more.
In order to find the bug I have spent so much time :( But I can't understand the reason, can you help me?
It works fine for me :? , can you try latest version.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2011, 6:11 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
It works for the lastest version.
But I can't understand the cause for the old version.

Can u supply a version without depandance?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2011, 7:15 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
hughman wrote:
It works for the lastest version.
But I can't understand the cause for the old version.
Great :)
It worked for me with old version as well so I am not sure why it did not work for you
Code:
Can u supply a version without depandance?
No, this would just make it more complex and more difficult to maintain.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2011, 2:01 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
́
HotKeyIt wrote:
Can you try newest version ( also new _Struct() version).
Also try compiling 1.1.2.03 using new compiler.

Thanks, everything is working fine now :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 5th, 2011, 7:50 pm 
I just tried this script and it does not seem to be working.

What I did:
1. downloaded _Struct.ahk and sizeof.ahk and put them in the lib folder.
2. ran the example and a GUI window with two listviews appeared.
3. created a text file in one of the listed directroy and nothing happens.

Am I missing something? (v1.1.03.00, Unicode, 64bit build)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 5th, 2011, 8:47 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
I have fixed a bug in _Struct and sizeof() and corrected OVERLAPPED structure in WatchDirectory().
Can you redownload them all and try again.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 6th, 2011, 7:17 pm 
It seems to be working now. Thanks. This is useful.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 9:49 am 
If I compile the script using this function, I get the this error.
Code:
Line Text: sizeof(_TYPE_)
Error: Duplicate function definition.

The program will exit.
This does not occur if the script is not compiled. And if I removed the line, #include <_Struct> and compile the script, there is no error but the function does not seem to respond.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 12:07 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
This should be fixed in next AHK_L release. (Currently you can change it to something like
Code:
..\lib\sizeof.ahk
..\lib\_Struct.ahk

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 12:59 pm 
HotKeyIt wrote:
This should be fixed in next AHK_L release. (Currently you can change it to something like
Code:
..\lib\sizeof.ahk
..\lib\_Struct.ahk
It doesn't make a difference for me. Isn't the line, #Include <sizeof> in _Struct.ahk causing the error?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 4:35 pm 
Another problem. I use the 64bit build and if I compile with the 32bit source file, Unicode 32-bit.bin, the function does not respond. It works with the 64 bit source file. (the line #Include <sizeof> in _Struct.ahk has to be removed to compile though.)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2011, 5:39 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Anonymous wrote:
It doesn't make a difference for me. Isn't the line, #Include <sizeof> in _Struct.ahk causing the error?
Has to be replaced with above or similar, depends where your Lib directory is :!:

Anonymous wrote:
(the line #Include <sizeof> in _Struct.ahk has to be removed to compile though.)
Same as above, currently you have to use absolute path when compiling.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], Google [Bot], jepjep24, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group