Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 999
» Latest member: Leeroll
» Forum threads: 6,344
» Forum posts: 34,242

Full Statistics

Online Users
There are currently 9 online users.
» 0 Member(s) | 9 Guest(s)

Latest Threads
Running macro on backgrou...
Forum: General
Last Post: Gintaras
01-15-2018, 01:08 PM
» Replies: 2
» Views: 149
Find, click in search res...
Forum: Wish List
Last Post: r0n
01-15-2018, 10:38 AM
» Replies: 2
» Views: 41
Background send message, ...
Forum: General
Last Post: ilya1111
01-08-2018, 06:07 PM
» Replies: 2
» Views: 274
Hotkeys doesnt work
Forum: Bug Reports
Last Post: Gintaras
01-07-2018, 07:50 AM
» Replies: 1
» Views: 65
find only first image
Forum: General
Last Post: ilya1111
01-04-2018, 01:00 PM
» Replies: 3
» Views: 140
wait for image problem
Forum: General
Last Post: john_b
12-28-2017, 08:42 PM
» Replies: 1
» Views: 85
Values Populated in Incor...
Forum: Programming
Last Post: philipq
12-28-2017, 05:42 AM
» Replies: 5
» Views: 134
FTP Upload - Special char...
Forum: General
Last Post: Gintaras
12-25-2017, 08:04 PM
» Replies: 2
» Views: 81
How to Read/Write Memory ...
Forum: Programming
Last Post: kapodeV2
12-24-2017, 07:05 AM
» Replies: 2
» Views: 94
Remove Carriage Line - co...
Forum: General
Last Post: frank
12-20-2017, 07:36 PM
» Replies: 2
» Views: 81

  Find, click in search result on folder => highlight
Posted by: r0n - 01-14-2018, 08:00 PM - Forum: Wish List - Replies (2)

Small request.
If you click on a folder item in the search results, the focus is put on the folder in QM items list.
The problem is that it is highlighted in very light grey, I almost can not see it on my monitor.
BUT on other monitors it shows better.
My request: could you make it bit darker or have it customizable in Options > Editor > Styles?

It is not very important. Only consider this if you can implement it easily or if you feel it might be really useful for everyone.

Print this item

  Hotkeys doesnt work
Posted by: Leeroll - 01-06-2018, 02:37 PM - Forum: Bug Reports - Replies (1)

I dont know why but I have tried everything. Making sure hotkeys/triggers is enabled, making sure the triggerkey on the macro is correct and is stated so on the macro but everytime I press the trigger, nothing happens. However if I click RUN, the macro works. 

Would really appreciate some help with this!!!

Print this item

  Background send message, opening file
Posted by: ilya1111 - 01-04-2018, 01:21 PM - Forum: General - Replies (2)

Good day Gintaras and all everything!
I congratulate everyone on the coming New Year. Success and prosperity to you!
Glad that the forum is working again.
I would like to hear advice on how to solve the problem.
I run the program in the background or in hidden mode and that's fine, but when I close the first hidden window (the "Login Error" window) the next window "Login to Cloud Manager" becomes active. If I close the second window the program becomes active (in focus). Is it possible to do this all in the background or in the Hidden mode, so that the windows and the program do not become active until it is needed?

Macro Macro2

run "$appdata$\Lira\1.exe" "" "" "*" 4|0x100
int w1=wait(3 WC win("Login Error" "QWidget"))
int h=win("Login Error" "QWidget")
int w2=wait(5 WC win("Login to Cloud" "QWidget"))
int w3=win("Login to Cloud" "QWidget")

Next, I need to open the file, do it in background mode, the record menu does not recognize the menu items, so I did it this way:

Macro Macro2 
key Sp      ;; Shift+P opens the file open menu
key A           ;; Alt
key D           ;; Down
key Y           ;; Enterthese 3 commands is a file-open
key "101.bin" ;; file name
key Y           ;; Enter
int w522=win("Beta" "QWidget" "1")
mov 0 0 w522
int w122=win("Beta" "QWidget" "1")
lef 1099 328 w122 1

Can this part (the opening of the file 101.bin) also be done in the background? The last action is clicking on the coordinates in the "Beta" window, using the keys there is no possibility to perform this action as I did not try, it would be good to do it, but if it is difficult it is not so important. Then I need to make the program active when a picture is found.
There are not many similar tasks on the forum, the commands that I found SendKeysToWindow2 did not work or I misused them. Please, help.

Print this item

  wait for image problem
Posted by: john_b - 12-28-2017, 05:06 PM - Forum: General - Replies (1)

This code work only if i click the run
Is the second macro
Macro 1 works ok
Macro 2 no work.
Any help?

function hwnd idObject idChild
Acc a.FromEvent(hwnd idObject idChild)
out a.Name
int w=win("WSJT-X   v1.8.0   by K1JT" "Qt5QWindowIcon")
wait 0 S "image:h6CA8E71D" w 0 1|16|0x400
#region Recorded 28/12/2017 6:07:17 μμ
wait 1
int w1=act(win("WSJT-X   v1.8.0   by K1JT" "Qt5QWindowIcon"))
lef 800 397 w1 1 ;;κουμπί πίεσης 'Erase Alt+E', "~:AD067C6D"
lef 1814 622 w1 1 ;;κουμπί πίεσης 'Tx 6 Alt+6', "~:F658943B"

The macro one is:
function hwnd idObject idChild
Acc a.FromEvent(hwnd idObject idChild)
out a.Name
int w=win("WSJT-X   v1.8.0   by K1JT - Log QSO" "Qt5QWindowIcon")
#region Recorded 27/12/2017 6:23:04 μμ
wait 1
int w1=win("WSJT-X   v1.8.0   by K1JT - Log QSO" "Qt5QWindowIcon")
lef 206 214 w1 1 ;;κουμπί πίεσης 'OK Enter'
wait 1
int w2=act(win("WSJT-X   v1.8.0   by K1JT" "Qt5QWindowIcon"))
lef 1222 395 w2 1 ;;πλαίσιο ελέγχου 'Enable Tx Alt+n'

Print this item

  Values Populated in Incorrect Fields - Web Form
Posted by: philipq - 12-27-2017, 07:18 AM - Forum: Programming - Replies (5)


I have been using a QM macro for over 4 years now successfully.
However, very recently the web form fields are being populated incorrectly.
This is intermittent in nature - part of the time correct entries are passed, while at other times the entries are in the wrong fields.
I checked the HTML codes on the fields to see if there were any changes but found none.

Kindly assist.

Code listed as below and the issue place is highlighted with asterisks and comment:

Macro RO Sales gDN

;;--- Recorded 13-Oct-13 6:49:06 PM ----
opt slowkeys 1; opt slowmouse 0; spe 70

ExcelSheet es.Init
ARRAY(str) vin, custType, title, fmName, surname, fullName, mobile, regNum, emailAdd, poBox, place, price, rdate
int w, w1, w2, w3, w4, w5, w6, w11, w12, typeNum, found, titleErrorCheck, w10
Htm e, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e50, e52, e23
str custType2, title2, fullName2
Acc a, a12, a3

int varRep ;;string variable. If need numeric, replace str to int or double.
inp- varRep "Kindly input number of times to repeat this procedure"

DateTime t1 t2
str sStart sEnd sTime


;str varDat ;;string variable. If need numeric, replace str to int or double.
;inp- varDat "Kindly advise the date to report on VISTA"


rep varRep
,;;Initialize critical variables as empty

,;str varDate = ""
,;inp- varDate "" "gDN Date"
,w1=act(win("Test " "XLMAIN"))
,'D    ;; Down
,;get selected cells in Excel
,es.CellsToArray(vin "sel")
,es.CellsToArray(custType "sel")
,es.CellsToArray(title "sel")
,es.CellsToArray(fmName "sel")
,es.CellsToArray(surname "sel")
,es.CellsToArray(fullName "sel")
,es.CellsToArray(mobile "sel")
,es.CellsToArray(regNum "sel")
,es.CellsToArray(poBox "sel")
,es.CellsToArray(place "sel")
,es.CellsToArray(price "sel")
,es.CellsToArray(rdate "sel")
,es.CellsToArray(emailAdd "sel")
,;opt slowkeys 1
,w=wait(0 WV win("Register Vehicle Sale " "IEFrame"))
,act w
,;w2=act(win("Register Vehicle Sale - Windows Internet Explorer" "IEFrame"))
,e=htm("INPUT" "ctl00_cphMain_txtSelectVIN" "" w "0" 6 0x121 50)
,e1=htm("INPUT" "ctl00_cphMain_btnVINSearch" "" w "0" 7 0x121 50)

,wait 3
,;Vehicle Sale Date
,;*********************************************ISSUE STARTS FROM HERE ON***********************************************************************
,;************************************************************************DATE CHANGE AUTOMATED HERE********************************************************************
,e2=htm("INPUT" "ctl00_cphMain_txtSaleDate" "" w "0" 27 0x121 50)
,;Vehicle Registration Date
,e16=htm("INPUT" "ctl00_cphMain_txtRegDate" "" w "0" 28 0x121 50)
,;************************************************************************DATE CHANGE AUTOMATED HERE********************************************************************
,;Client Type
,e3=htm("SELECT" "ctl00_cphMain_cboClientType" "" w "0" 1 0x121 50)
,typeNum=SelStr(1 custType2 "C" "P" "V")
,if typeNum=1
,,wait 4
,,gDNCompany(fullName2)    ;;Separate Function 'gDNCompany' written to complete name filling
,,goto Mobile
,if typeNum=2
,,wait 4
,if typeNum=3
,,wait 4
,wait 1
,e5=htm("SELECT" "ctl00_cphMain_cboTitle" "" w "0" 2 0x121 50)
,,,wait 4
,,,titleErrorCheck = 1
,;wait 2
,if titleErrorCheck = 1
,,e21=htm("INPUT" "ctl00_cphMain_txtOtherTitle" "" w "0" 34 0x121 50)
,,titleErrorCheck = 0
,else if title2.ucase = "OTHER"
,,e21=htm("INPUT" "ctl00_cphMain_txtOtherTitle" "" w "0" 34 0x121 50)
,;First & Middle Name
,e4=htm("INPUT" "ctl00_cphMain_txtFirstName" "" w "0" 36 0x121 50)
,if title2.ucase = "OTHER"
,e6=htm("INPUT" "ctl00_cphMain_txtSurname" "" w "0" 38 0x121 30)
,if title2.ucase = "OTHER"
,if fullName2="M/s. Al Tayer Motors"
,,e20=htm("INPUT" "ctl00_cphMain_txtTelephoneWork" "" w "0" 44 0x121 50)
,,e52=htm("INPUT" "ctl00_cphMain_txtTelephoneMobile" "" w "0" 47 0x121 50)
,,e7=htm("INPUT" "ctl00_cphMain_txtTelephoneMobile" "" w "0" 47 0x121 50)
,;Registration Number
,e8=htm("INPUT" "ctl00_cphMain_txtRegNumber" "" w "0" 30 0x121 50)
,;Email Address
,e17=htm("INPUT" "ctl00_cphMain_txtEmail" "" w "0" 33 0x121 3)
,;Physical Address
,e9=htm("INPUT" "ctl00_cphMain_txtAddress1" "" w "0" 33 0x121 50)
,;PO Box
,e10=htm("INPUT" "ctl00_cphMain_txtPOBox" "" w "0" 35 0x121 50)
,;Post/Zip Code
,e11=htm("INPUT" "ctl00_cphMain_txtPostcode" "" w "0" 37 0x121 50)
,e12=htm("INPUT" "ctl00_cphMain_txtCity" "" w "0" 39 0x121 50)

,;t=mes("Go Ahead?" "Go Ahead?" m) ;;***************************************
,;Click Register Sale
,e13=htm("INPUT" "ctl00_cphMain_btnRegister" "" w "0" 50 0x121 50)
,wait 1
,;Click 'OK' on email error message
,w11=wait(1 WV win("Message from webpage" "#32770"))
,,goto defender
,a.Find(w11 "WINDOW" "WARNING: You MUST enter a valid email address!" "class=Static" 0x1005 3 0 "previous previous")
,,goto defender
,wait 0.25
,;wait 2
,;Click 'OK' on error message - DEFENDER NO OPTIONS
,int w8=wait(1 WV win("Message from webpage" "#32770"))
,,goto pricePage
,Acc a1.Find(w8 "WINDOW" "No Option or Extended warranty not available " "class=Static" 0x1035 0 0 "previous previous")
,,goto pricePage
,wait 0.25
,wait 1 ;;******************
,goto toExcel
,wait 2
,;;w4=wait(0 WV win("Client Details " "IEFrame"))
,w4=wait(5 WV win("https://www.globaldealernetworking.com/" "IEFrame"))
,,w4=wait(5 WV win("Client Details " "IEFrame"))

,;wait 2
,;if typeNum=1
,,;Htm e23=htm("INPUT" "_ctl0_cphMain_txtForename" "" w4 "0" 13 0x121 10)
,,;Htm e24=htm("INPUT" "_ctl0_cphMain_txtSurname" "" w4 "0" 15 0x121 10)
,int repeatPurchasePrice=0
,wait 2 ;;*****************
,e14=htm("INPUT" "_ctl0_cphMain_txtPurchasePrice" "" w4 "0" 46 0x121 15)
,,if repeatPurchasePrice<13
,,,goto PurchasePrice
,wait 0.75 ;;******************
,;;Click Next
,e15=htm("INPUT" "_ctl0_cphMain_btnNext" "" w4 "0" 55 0x121 50)
,wait 1  ;;*************************
,;wait 5
,w3=win("Internet Explorer" "IEFrame")
,rep 7
,,wait 1
,,e50=htm("INPUT" "rbnTrue1" "" w3 "0" 3 0x101 10)
,,if e50 ;;page "Question Time! -*"
,,,wait 1
,,,e22=htm("INPUT" "btnSubmit" "" w3 "0" 5 0x121 5)
,,,wait 1
,,,e18=htm("INPUT" "btnNext" "" w3 "0" 15 0x101 5)
,,,wait 1
,,,,int w9=wait(3 WV win("Question Time! - Internet Explorer" "IEFrame"))
,,,,,w9=wait(3 WV win("https://www.globaldealernetworking.com/ - Question Time! " "IEFrame"))
,,,,clo w9
,,,,goto toExcel
,,,;wait 5
,,,w2=wait(0 WV win("select_product " "IEFrame"))
,,,e18=htm("INPUT" "btnNext" "" w2 "0" 17 0x121 30)
,,,;wait 3
,,,if e18 ;;page "select_product -*"
,,,,wait 0.5
,,;if(!found) mes "error"
,;wait 30 WT w4 "view_policy_details - Windows Internet Explorer"
,w6=wait(0 WV win("view_policy_details " "IEFrame"))
,;wait 3
,;Click 'OK'
,e19=htm("INPUT" "btnNext" "" w6 "0" 2 0x121 50)
,w5=wait(0 WV win("Client Details " "IEFrame"))
,clo w5
,;activate excel, change executed record VIN to red colour and save file
,act w1
,'L(#13); 0.12   ;; Left(*10)
,Acc a2.Find(w1 "PAGETAB" "Home" "class=NetUIHWND" 0x1005 10)
,;lef 279 105 w1 1; 1 ;;property page 'Ribbon', grid drop down button 'Font Color'
,;lef 31 157 wait(15 win("" "Net UI Tool Window")) 1 ;;NetUIHWND 'Font Color', list item 'Red'
,wait 1

sTime=TimeSpanToStr(t2-t1 2)

out sStart
out sEnd
out sTime

mes "gDN Report Completed" "Execution Successful"

opt slowkeys 0; opt slowmouse 0; spe -1

Print this item

  FTP Upload - Special characters
Posted by: Extreme - 12-25-2017, 07:34 PM - Forum: General - Replies (2)

Hi !

I have a problem when uploading files to an FTP server that contains "special characters"

For example, if i want to upload a file named "Voici le Maître.jpeg" , it uploads correctly, but when i look in the FTP directory, the file is renamed : "Voici le Ma" , with no file extensions.

Macro testupload

Ftp f
f.Connect("ftp.server.test" "user" "pwd" 21 0 1)
f.SetProgressDialog(1 "Progress")
f.FilePut(F"$desktop$\Voici le Maître.jpeg" F"Voici le Maître.jpeg")

Note : If i upload directly from Filezilla, there is no problems

Can you help me ? Thanks Smile

Print this item

  How to Read/Write Memory values for a certain Process?
Posted by: kapodeV2 - 12-21-2017, 09:50 AM - Forum: Programming - Replies (2)

I only have here a Sample code,dont know how to make it in QM.
just want to read/write values in a certain application.

Pseudo code Example
;Declaration of Addresses/offsets
def BaseAddress        0x0BB2EE
def Offset1                0x2C7
def Offset2                0xBB1

;Setting the Pointer for the addresses
Address1 = BaseAddress + Offset1
Address2 = BaseAddress + Offset2

;Attach Process/Allocates memory
int hWnd = win("Target Window")
__ProcessMemory o.Alloc(hWnd 0)

;Write/Read the memory

int value = 1
int read = ReadProcessMemory(o Address1 &Value 4 0)
int write = WriteProcessMemory(o, BaseAddress1, &NewValue 4 0)

Hope someone can Help me.Thank you

Print this item

  Remove Carriage Line - copying from Excel
Posted by: frank - 12-20-2017, 05:25 PM - Forum: General - Replies (2)

I have a macro that copies excel cell then getclip to variable.

When I 'key' this variable it has a carriage return.

How can I strip out the carriage return?

Print this item

  Running macro on background
Posted by: tatsuoshu - 12-19-2017, 06:35 PM - Forum: General - Replies (2)


I'm trying to make a macro that works on an application (game) and can run on the background. I've found some threads with the "SendKeyToWindow" function, however I can't get it implemented. The problem is that it works perfectly if I'm in a typing environment (like the chat in the game), but it doesn't do anything outside that environment (for example moving the target).
Does anyone has any ideas?
Below is the macro and the SendKeysToWindow function:


int w=act(win("APPLICATION_NAME" "D3D Window"))
    SendKeysToWindow2 w key(6)
    SendKeysToWindow2 w key(V)
    SendKeysToWindow2 w key(V)
    SendKeysToWindow2 w key(V)
    wait 5

key(6) refers to an action and key(V) refers to pressing space.

function hwnd ARRAY(KEYEVENT)'a

Sends keys to a child window using WM_KEYDOWN/WM_KEYUP messages.
The window can be inactive, but with some windows then does not work.

hwnd - child window handle. Or main window handle, if it receives keys.
a - the <help>key</help> function.

int hwnd=id(15 "Notepad")
SendKeysToWindow2 hwnd key("text[]" Cs)

int i lparam m up alt ati
str sk
ifk(A) alt=1

for i 0 a.len
    KEYEVENT k=a[i]
    if(k.flags&0x80) i+1; continue ;;wait
        case [16,17,18]
        int th1=GetCurrentThreadId
        int th2=GetWindowThreadProcessId(hwnd &i)
        ati=AttachThreadInput(th1 th2 1)

for i 0 a.len
    if(k.flags&0x80) ;;wait
        opt waitmsg -1
        wait (a[i].wt/1000.0)
    if(k.flags&KEYEVENTF_EXTENDEDKEY) lparam|0x01000000
    if(k.flags&KEYEVENTF_KEYUP) lparam|0xC0000000; up=1; else up=0
    if(alt) m=iif(up WM_SYSKEYUP WM_SYSKEYDOWN); lparam|0x20000000
    else m=iif(up WM_KEYUP WM_KEYDOWN)
    if(k.vk=VK_RETURN) 0.01 ;;some controls, eg PSPad, would insert new line too early
    PostMessage hwnd m k.vk lparam
        case [16,17,18] ;;modifier keys
         wait while processes prev keys
        if(i) SendMessage hwnd 0 0 0
        GetKeyboardState sk
        sk[k.vk]=iif(up 0 0x80)
        SetKeyboardState sk
    if(k.vk=VK_MENU) alt=!up

if(ati) ati=AttachThreadInput(th1 th2 0)

Print this item

  Press and release trigger
Posted by: ilya1111 - 12-17-2017, 12:22 PM - Forum: General - Replies (2)

Today my question is not stupid)
Can I make a trigger that would run the macro1 when I press the space key and macro2 when I release the space key?
How to do it?
Love this forum)

Print this item