Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
please write some more documentation
what about some tutorials here in the forum about how to work with the qm editor?

it would be nice to see your way of using qm.
I don't have some special way or system of using qm. 90% of time I use qm to develop and test qm itself. 10% - write macros on demand. Don't know what tutorial I could write. I think everything is documented or self explanatory. Please give a list of things that are not clear.
check out Ken Gray's blog lessons:

also as you get more skills at QM, you will begin to appreciate the genius of the help file, very clear explanations of return values, flags, etc

Best way to get better (IMHO):

1. Import the tons of examples in and find one that does something close to what you want. Modify it as necessary and then when you run in to trouble, look up the relevant function in help file or forum. If no answer there, then:

2) post question to forum WITH YOUR DRAFT CODE and you should get someone (usually Gintaras..God Bless Him!) answering your problem with code or pointing you in right direction. Remember to very clearly explain what you are trying to do.

Good luck,
i mean working with the qm editor when coding.
forgive me pi, didn't realize it was you....I think you used to have the name pi in the Author column of your posts. Of course you already know the things I posted. I thought it was someone going through my early experience and just wanted to share friendly advice. I understand now that you mean specifically how to use the QM editor itself to make the act of coding more efficient. I do use favorites, and the "mirror in right", "shift to right" functions of active windows ALOT since the update that brought them to QM. Like you, I think I could still get a lot more out of it if I understood more. Thanks for putting your query up to the forum.

Hello to all,

I need help to clarify how to download a file thru ftp.

I have just one file to download "' and it is binary with a size of 31mgb.
Please help me with a simplified command.

I found these from the samples but I find it lengthy and complicated to understand.
I would appreciate if color can be instructed for mandatory input and another color for

Can anybody explain line by line also what these means?

Enumerate files and folders in current ftp directory:
lpstr s=f.Dir("*" 2 &fd)
if(s=0) break
if(fd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) out "%s (directory)" s
else out s
s=f.Dir("" 2 &fd)

Change current local directory:
SetCurDir "c:\Users\Ver\Desktop\"
function# $ftpfile $localfile [failifexists] [ascii]

if(FtpGetFileW(m_hi @ftpfile @_s.expandpath(localfile) failifexists FILE_ATTRIBUTE_NORMAL iif(ascii FTP_TRANSFER_TYPE_ASCII FTP_TRANSFER_TYPE_BINARY) 0)) ret 1

Thank you for welcoming me into your forum!

Sincerely ,

Macro Macro1377
Copy      Help
;Declare variable and start FTP session
Ftp f.Connect("" "myname" "password")

;If need, change current ftp directory to the directory where the file is
if(!f.DirSet("public_html/zipfiles")) end "failed to set FTP current directory"

;Download to desktop
if(!f.FileGet("" "$desktop$\")) end "failed to download"

mes "downloaded"

If can download without FTP, easier would be to use function IntGetFile.

You have the quickest response and it happened while I am still in the forum.

Thank you for the short macro code.
Download to desktop
if(!f.FileGet("" "$desktop$\")) end "failed to download"

In the $desktop$ do I replace this with my local directory as in

"$desktop$\local directory\" or is it? the one below?
C:\local directory\"

Also I notice the binary was not mentioned. It must be the default. What about if it is a ascii?

Thank you so much.


Click FilePut and look in status bar.
4-th argument is ascii. It can be 0 (default, binary) or 1 (ascii).
Is this line below acceptable ? I am still getting non stop flashing download light from my router.

if(!f.FileGet("" "C:\Users\Ver\Desktop\")) end "failed to download"

Also Gintaro or the experts kindly help me fill the right info to stop the ftp operation after the download file is done?

Thank you for any assistance.

The line is correct.
The ftp session ends when the macro ends. Don't need to stop explicitly. If want to stop earlier, use
I am so happy that my ftp script to download a file now works and thanks to our QM guru Gintaras. I just put his single line instruction above and
the flashing stopped.

This may be good as part of the examples of QM ftp documentation:
QM Scripting examples for both ascii or binary files

simple ftp commands for the QM :
downloading 1 file
downloading more than 1 file
uploading 1 file
uploading more than 1 file

When downloading a file ,I noticed that no % progress is shown on the screen.
Does this latest version of QM have this feature? If not, may the creative genius of Gintaras add this important
feature on the future version of QM for the benefit of all users. Any feedbacks from others is also appreciated.


Possibly will add FTP progress % in some future QM version. And more help and samples.
Gintaras ,

I would like to be one of the first users of the % progress feature when you are successful.
My friend suggested that some good samples to emulate would come from Hope you would
not mind seeing their free script samples. Coupled with your exe, yours will be rated 10.


In QM most internet functions can show progress dialog.

Macro Macro1415
Copy      Help
;1. Download file.

;Declare variable and start FTP session
Ftp f.Connect("" "myname" "password")

;If need, change current ftp directory to the directory where the file is
if(!f.DirSet("public_html/zipfiles")) end "failed to set FTP current directory"

;Download to desktop
if(!f.FileGet("" "$desktop$\")) end "failed to download"

mes "downloaded"

Don't need to change existing code. Just insert

f.SetProgressDialog(1) your announcement of a new function ..........

Waking at 5:00 a.m. just got me excited when I saw your response about this % progress. But then how do I get to try it
as my version is only and you have already Please send me a link so I can use it too. Besides that, I want to
be the first one to try it as I stated before.

Thanks a lot,

Download beta from

Please come to the rescue. What is wrong with my setup. The 1 on the ( ) is not showing at all even though I have
been trying to type it several times. How can I show this ...It must be on the option setup.


mine appears as

f.SetProgressDialog( ). Also kindly explain what the (1) means.

Thanks a lot.

Don't see numbers in macro?
Look in Options -> Editor.


Click SetProgressDialog and press F1...

I followed as you suggested.

I could not find the "SetProgressDialog" but I found from the Menu:Tools, Options , Edit and under the Code "Number" instead and there I set my preferred color and it worked. Thanks for the lead.

This feature "SetProgressDialog(1)" works great for both downloading and uploading files.

Some times the window icon about "security access" spoils the fun. This window icons hides the % icon at the back making the upload or download % progress in a limbo since you cannot see the % progress operation. Can you please help how to get this window icon "security blocking internet access" out of the way.

Do you need an image of what I am talking about?
Is there a command that the % progress icon will always show and over rides the window image no matter what?
I have the VISTA operating sysytem.


of California
If window A is sometimes covered by window B, you can:
1. Make window A "always on top".
2. Move window A somewhere where it would not be under window B.

You can do all it in 2 ways:
1. Edit the dialog code. Since it is a System dialog, it is not recommended.
2. Create function that would run automatically when A appears (assign window trigger). Let the function use ont or mov command. Or mov B when it appears.

It must be an Internet Explorer Security Blocker Setting of some sort for Window B. Whether I choose to remain
idle and not touching any botton , I notice that it will still process the uploading or downloading (while Window A hidden).
I shall try to screen capture it and post it when it shows up again.
Anyway do you have a good example guide in the forum for your recommended solution? I am not yet familiar with the QM trigger function.

I hope a one line macro will suffice.

Thank you as always,

of California
Quote:Anyway do you have a good example guide in the forum for your recommended solution? I am not yet familiar with the QM trigger function.

Triggers are in Properties dialog. If want to learn more, press F1 when you are there...

Thanks again.
I am attaching a jpg for the Windows Firewall block for the reading pleasures of others.
Does anybody have any suggestions of deactivating this feature?

of California

Attached Files Image(s)
Using Ftp in QM? In Connect add flag for passive.

Ftp f
f.Connect(... 1)

Ftp f
f.Connect(... 1)

Did those 2 lines above mean......

Ftp f.Connect("ftp server" "userid" "password" 1).

If I understood you right, I tried it but the script stopped working as blank.

Can we try another way?


of California
Please click word Connect in editor text and press F1.

Can you help with a macro to put the QM uploading or downloading icon always on top of any pop up blockers when either uploading or downloading.
or I suggest a one line macro to consider on next version.

Thank you,

of California
The firewall dialog itself is on top. Need to move the progress dialog.

Function qm_internet_progress_dialog_pos
Trigger !cv"Downloading" "#32770" "" "" "" 0x2     Help - how to add the trigger to the macro
Copy      Help
int hwnd=val(_command)
mov 0 0 hwnd

To avoid the firewall dialog, use flag 1 with http://Ftp.Connect.
The flag added in QM 2.3.2. If you don't find it, maybe you have older QM version.

I need your expertise as usual. As I took a break from all of these, I tried learning your array samples.

; Generate the square root of a number between c to b
int i c b
ARRAY(int) a
for(i c b) a[]=i ;;adds and sets 1 element
for(i c a.len) out "The square root of" ; out (a); out "is" ; out sqrt(a[i]) ;; this is a working line

;; question for Gintaras....kindly help what am I doing wrong?
;; why does the iteration starts at 4?
;; If I want to generate square root from 3 to 100 what are the steps to revise?
;; if I want to have one line printout like[i]
"The square root of 3 is 1.73205080756888"
then next line "The square root of 4 is 2.0000000000000".....and so on ( here it shows can I have say 13 decimal places)

Thank you sir,

of California

Forum Jump:

Users browsing this thread: 1 Guest(s)