Billkoy3

Open form2 in new window, read data from that form

10 posts in this topic

Hi.

I downloaded today AutoIt, so Im complete newbie (please be forgiving :)   ) . Im trying to make my own program and I stucked in:  Form1 is main window and it got Button called "Lista". I want to make function that while I Press button "Lista" it will open form2 in another window. Form2 is data source file: It will contain inputs from 1 - input180~. My script (form1) shall read info from form2. I searched on forum but I only found options like while pressed button it will exit form1 and CREATE form2. Thats the point. I want to make app, with will read info's from another forms and put this editable infos into game. My english is not good: I will put some pictures to make more understable what I mean. 

 

1.thumb.jpg.d0f3137c90897201235ab5c3f030

Mistake: It shall open Form 2/form 3/ form 4 (i write twice 3)/form 5     etc

2.thumb.jpg.7c016a2f1adcf501b1902ce8a7de

 

3.thumb.jpg.776d4a65217f14c05bf4b5e5a3c2

 

First of all. Is it possible to make it somehow in easier way?

Im planning to build it like: 

when Press Start of Part1.

Script will write in game data from column 1:

write text from column1, check if value is > than text in column2. If yes continue, if no gotolane 2 and start everything from beggining but with values from lane 2.

Lets say value is > - so it will continue

It will write value with contain column 3 first line.

Then in x,y,z mouse spot press left mouse button (value in column 4) times. 

Its an example to show you guys what I mean. I already know how to do it. 

BUT:

How make main program to be connected with Form2 and read value's from there?? 

I tried to add #include <Form2.au3>

but then program open form2 instead of main form.

Tried aswell func like "shellexecute/ run" but none of them worked as I wanted to. 

 

If its not possible I will just have to make everything in 1 script (this its easy to solve with Slideshow button and form with contains data)

But... will it work properly while script will got 4000 + line's ? Or it had to be done in parts ? -.^

Looking for answers! 

 

 

 

 

Share this post


Link to post
Share on other sites



Well, thanks. 

With this option I have to write everything in 1 script. Will it work well while it will got 4000+ line's ? I though that bigger files may work not good/slow due of big amount of data in it. I never used any programming language's. AutoIt is first, so that kind of question may be stupid for ya guys, but for me its important to know it! :)  

And to be sure if I understand it good. While I write everything in 1 script, I will be able to use data from other forms?

for example:

since guictrlread() is taking value's from form under with I write it (if I think good)

can i set up parametrs like: $form2price = guictrlread($Input1)

then in Form 1 use this parametr?

Or $form2price will work just in 2nd form?

Share this post


Link to post
Share on other sites

Lova ya dude! Thanks for fast and helpful answers! 

Share this post


Link to post
Share on other sites

Whats wrong here?

func bl()
    MouseClick($MOUSE_CLICK_LEFT, 701, 630, 2)
    controlsend("Tibia","","","{backspace}")
    controlsend("Tibia","","",$bl1)
    $kk = guictrlread($blmin1)
    $kkk = guictrlread($blmax1)
    $mem = _MemoryRead($pointer,$memaaa)                    

## (i put input in my window where I write manually actually address with I check everytime since no clue how to setup pointers - its np, check one per 1 open - twice a day)##
  

 $cena = $mem + 1
    if $cena > $kk and $cena < $kkk Then
        MouseClick($MOUSE_CLICK_LEFT, 930, 647, 2)
        controlsend("Tibia","","",guictrlread($cena))
        MouseClick($MOUSE_CLICK_LEFT, 1034, 619, ($blilosc1-1))
        MouseClick($MOUSE_CLICK_LEFT, 1071, 620, 1)
    Else
        Sleep(2000)
        EndIf

    EndFunc

Share this post


Link to post
Share on other sites

Anyone noticed any error? Program just crash while I open it. It compile without any errors. Program got atm 2700~ lane's. What should I change to make it work without problems? 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Billkoy3,

Script will write in game data from column 1:

controlsend("Tibia","","","{backspace}")
controlsend("Tibia","","",$bl1)
$kk = guictrlread($blmin1)
$kkk = guictrlread($blmax1)
$mem = _MemoryRead($pointer,$memaaa)

I get lots of game related hits when I search for "Tibia" - are you sure this question does not fall foul of the Forum rules?

M23

 

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Billkoy3,

After our PM exchange:

Yes, it is a gaming question and so is not allowed.

No, I will not help you privately.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Billkoy3,

I now learn that you have been PMing MVPs asking for help with this script. As the script is quite clearly against the forum rules (no, I did not "misunderstand" what you are doing) they quite rightly have refused.

Serious warning - if you step out of line again you will find yourself on the naughty step for some time. Please read the Forum rules to which I linked you above carefully and make sure you follow them from now on.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.