I have developed an email application using the best macro software available on this planet.
The software connects to a PHP backend on my webserver which connects to any IMAP/POP server anywhere and retrieves your mail.
USE: Mainly for corporates who work behind a stringent proxy or firewall.
----------------
Question 1:
When I am downloading files (refer screenshot), the memory usage (refer screenshot , right side) increases to a level which is highly unacceptable to me.
Can you think of any reason that is causing this ??
10 str s IntGetFile "http://www.quickmacros.com/quickm21.exe" s 0 0 1
When starts - 3 MB,
when begins downloading - 6 MB (loads dlls, etc),
when ends downloading - 8 MB (quickm21.exe is 2 MB, and all data is stored in variable).
I am going to create IntGetFile function that writes directly to file instead of variable.
I am attaching whole System.qml. Download and move to QM folder, replacing old System.qml (make backup!!). What is new in it:
IntGetFile:
flag 16 - download directly to file.
Use callback function to receive progress info.
New function Http.PostFormData:
Easier to use and more powerful than Http.Post and IntPost.
Post multiple simple fields and/or files in single call.
Don't worry about posted string format, encoding, headers, etc.
Use callback function to receive progress info.
out ARRAY(POSTFIELD) a.create(6); int i
a[i].name="exe1"; a[i].value="$system$\notepad.exe"; a[i].isfile=1; i+1
a[i].name="txt2"; a[i].value="some text 2"; a[i].isfile=0; i+1
a[i].name="userfile"; a[i].value="$desktop$\test.txt"; a[i].isfile=1; i+1
a[i].name="qml"; a[i].value="$desktop$\Macro295.qml"; a[i].isfile=1; i+1
a[i].name="txt"; a[i].value="some text 1"; a[i].isfile=0; i+1
a[i].name="exe2"; a[i].value="$system$\calc.exe"; a[i].isfile=1; i+1
int hwnd=ShowDialog("" 0 0 0 1) Http h.Connect("www.quickmacros.com"); str r if(!h.PostFormData("form.php" a r "" &PostFormData_progress_dialog hwnd)) end "failed" out r
out ARRAY(POSTFIELD) a.create(2); int i
a[i].name="exe1"; a[i].value="$system$\notepad.exe"; a[i].isfile=1; i+1
a[i].name="exe2"; a[i].value="$system$\calc.exe"; a[i].isfile=1; i+1
type PFD_CALLBACK hwnd nbFilesTotal PFD_CALLBACK d
d.hwnd=ShowDialog("" 0 0 0 1) Http h.Connect("www.quickmacros.com"); str r if(!h.PostFormData("form.php" a r "" &PostFormData_progress_dialog2 &d)) end "failed" out "Total size of uploaded files is %i KB" d.nbFilesTotal/1024 out r
out ;files ARRAY(str) af.create(2)
af[0]="$system$\notepad.exe"
af[1]="$system$\calc.exe" ;callback function data type PFD_CALLBACK2 hwnd nbTotal nbSent PFD_CALLBACK2 c ;get total size Dir d; int i for(i 0 af.len) if(d.dir(af[i])) c.nbTotal+d.FileSize; else end "file does not exist" ;show dialog, connect
c.hwnd=ShowDialog("" 0 0 0 1) Http h.Connect("www.quickmacros.com"); str r ;post ARRAY(POSTFIELD) a.create(1); a[0].name="userfile"; a[0].isfile=1 for i 0 af.len ,a[0].value=af[i] ,if(!h.PostFormData("form.php" a r "" &PostFormData_progress_dialog3 &c)) end "failed" ,out r ;results out "Total size of uploaded files is %i KB" c.nbTotal/1024