Jump to content
Sign in to follow this  
ZLP

List Creation - (Moved)

Recommended Posts

So here's the thing, I was following the documentation of this course (https://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateList.htm) but for some reason my re-creation barely works at all, instead of making another "Debug", it seems to apear that it overwrites the last Debug which makes sense if you come to think about it but it doesn't apear to do that on the documentation, why's that?

This is my Code

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
 Autoclicker()
 Func Autoclicker()

   ;Hier UI elemente
     GUICreate("Maus Koordinaten")



   ;Beschreibung
   GUICtrlCreateLabel("F1 um neue Maus Position zu speichern",10,10,500)
   GUICtrlCreateLabel("F2 um Maus Koordinaten auf das Notepad zu übertragen",10,25,500)

   ;Hinzufügen, Löschen, Programm beenden
   Local $Loeschen = GUICtrlCreateButton("Löschen", 10, 320, 75, 25)
   Local $Debug       = GUICtrlCreateButton("Debug"  , 90,290, 75,  25)
   Local $Beenden  = GUICtrlCreateButton("Beenden", 90, 320, 75, 25)

   ;Listeninhalt Erstellen
    Local $Debug_List = GUICtrlCreateList("", 176, 50, 200, 300)

   ;
    GUICtrlSetLimit(-1, 200)
   ;Zum anzeigen vom display
   GUISetState(@SW_SHOW)

   ;Loop erstellen um das program offen zu halten bis Spieler
   ;Beenden drückt
   While 1
   Switch GUIGetMsg()
      case $Beenden
         ExitLoop

      Case $Debug
         GUICtrlSetData($Debug_List, "Debug")

      Case $Loeschen
         GUICtrlSetData($Debug_List, "")

   EndSwitch
   WEnd
EndFunc

 

Share this post


Link to post
Share on other sites

From the help file for GUICtrlSetData:

Quote

For Combo or List control :
If the "data" corresponds to an already existing entry it is set as the default.
 

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
8 minutes ago, Jos said:

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Moderation Team

I wasn't able to pick any topic besides this one that corosponded to scripts

Share this post


Link to post
Share on other sites
12 minutes ago, BrewManNH said:

From the help file for GUICtrlSetData:

 

What does this mean in return, that my Data has to be something different at first to make this work?

 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
2 minutes ago, Nine said:

Either it must be different or add "|" at the end of the string like :

GUICtrlSetData($Debug_List, "Debug|")

 

That actually worked!! ... but why?

Share this post


Link to post
Share on other sites

"|" is GUIDataSeparatorChar and is ignored when it is placed at the end of the string.  But it allows to duplicate items in a list when it is included in the string.  Let's call it a feature...

Share this post


Link to post
Share on other sites
45 minutes ago, Nine said:

"|" is GUIDataSeparatorChar and is ignored when it is placed at the end of the string.  But it allows to duplicate items in a list when it is included in the string.  Let's call it a feature...

I'm not a fan of this to say atleast... but alright, thanks alot!

Share this post


Link to post
Share on other sites
1 hour ago, ZLP said:

I'm not a fan of this to say atleast...

I suppose you wanted to say "the least" instead of "atleast". But you will understand that every powerful softwares has their intrinsic features.  This is where you get from noob to expert....

Share this post


Link to post
Share on other sites
57 minutes ago, Nine said:

I suppose you wanted to say "the least" instead of "atleast". But you will understand that every powerful softwares has their intrinsic features.  This is where you get from noob to expert....

But then again, is autoIT really powerful or simply fast and handy to use

Share this post


Link to post
Share on other sites

@ZLP,

I does look like the posted script is used for game automation:

On 7/23/2019 at 8:11 PM, ZLP said:

Autoclicker()  
Func Autoclicker() 

-snip-

  ;Loop erstellen um das program offen zu halten bis Spieler    ;Beenden drückt

...right?

You did look at our forum rules already? If not I would urge you to do that now!

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
On 7/25/2019 at 1:48 PM, Jos said:

@ZLP,

I does look like the posted script is used for game automation:

...right?

You did look at our forum rules already? If not I would urge you to do that now!

Jos

I don't like to argue but how's that a yes in any way?
I barely play games to begin with, I just choosed this as a project because it allows you to see feedback imediently and because it's actually somehow useful

Share this post


Link to post
Share on other sites

As I told you already: I do not care about your motives. You choose agame automation topic and this is against our rules so stop arguing and don as I told you 

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...