Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem placing inputbox
#1
Having a little problem in placing a inputbox, I cannot place it in another way than in the centre of the screen and on top of the other windows which is anoying. Searching didn't help me out

Code is something like this:

Start
if(!inp(_s "......" "...........)" )) ret
_s.setclip()
act "program"
key sendout
key command
key another command
goto Start

What i want is a small window in the right corner , maybe you have a idea for me?

TIA
#2
Input box question

You can edit it in the dialog editor. Make different size, add/remove controls, styles, etc.
#3
I saw this, but i cannot get it done, i get errors with this example. I'm not a programmer :oops: Maybey you can give me a clue how to do this?

THX
#4
In QM, create new function, name it inp2. Paste the code there using menu Edit -> Other formats -> Paste Escaped. Then in your macros use "inp2" instead of "inp".
#5
When I use this the window dissapears

I use this code now: in the inp2 what i should make:

;\Dialog_Editor
function# str&a [$text] [$caption] [$default] [x] [y]

;Input box. Similar to inp, but you can set position.
;Requires QM 2.1.8 or later.

;EXAMPLE
str s
if(!inp2(s "text" "caption" "" 0 -10)) end
out s


str controls = "0 3 4"
str d0 st3 e4
d0=iif(len(caption) caption "QM Input")
st3=text
e4=default
if(!ShowDialog("inp2" 0 &controls 0 0 0 0 0 x y)) ret
s=e4
ret 1

BEGIN DIALOG
0 "" 0x90C80A46 0x188 0 0 222 68 ""
3 Static 0x54000000 0x0 6 6 216 12 ""
4 Edit 0x54030080 0x200 6 24 214 14 ""
1 Button 0x54030001 0x4 118 50 48 14 "OK"
2 Button 0x54030000 0x4 170 50 48 14 "Cancel"
END DIALOG
DIALOG EDITOR: "" 0x2010900 "" ""

And in the program:

Start
if(!inp2(_s "......." "................." "" -1 1)) ret
_s.setclip()
act "....."
key keycode
key keycode
10
key keycode agan
10
goto Start

I cannot see what is wrong with this, maybe i'm stupid or so...... Big Grin
#6
When you paste the code from Input box question in inp2, don't edit it. In my post, "if(!inp2(_s "......" "..........." "" -1 1)) ret" was just an example of using inp2. Don't paste it in init2 code. I'm sorry if it confused you.


Forum Jump:


Users browsing this thread: 1 Guest(s)