GerrOrneq Posted November 23, 2013 Posted November 23, 2013 @dickjones007 Apologies for cutting in on your thread like this and if there is somewhere else I should have posted it, please excuse my ignorance. @Melba23 I have a suggestion for a minor but possibly helpful change to arraydisplay: For as long as I can remember it has been a slight nuisance that whenever the arraydisplay window pops up its height is grand But it's width is; well, way too narrow! I always find that I have to drag the window width out to make it more viewable, usually to about 3 X its starting width, I know I could maximise it, but I don't really like it that big either, so it would be great if it started off at 3 - 4 times its current width. So now that I spotted you are wanting suggestions, I thought now's the time to go for it. Apart from just the window width being wider, would it be possible that the column widths be also wider in proportion to the size of the arraydisplay window? i.e. say you had 3 columns with varying lenghts of data per column, then let those column widths fill the new window size in proportion to the length of the contents of the column (obviously capped in width so as not to take up all the space if a column content was very long.) Thank you for all the great work you are doing and I hope this suggestion is of use to many Autoit users. Regards, DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown
BrewManNH Posted November 23, 2013 Posted November 23, 2013 Look in my signature for an alternate Array.au3 UDF file, inside that is an array display that does that. 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 GudeHow 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
Terenz Posted November 23, 2013 Posted November 23, 2013 Terenz, Language customisation is not on the menu - sorry. What sort of "other Func()" do you see as being linked to that button? User defined ones as is the case with HotKeys? Other internal Autoit functions? I am struggling to see quite what the purpose would be, so do please explain in more detail. M23 No label changes? Bad My original idea was example change the label from "Copy to clipboard" in "Export to LOG" and change the basic function "copy all - selected on the clipboard" in another custom Function, write by the user, for save on .log insted to copy on the clip: _ArrayDisplay(many param etc, "_MyButtonFunc") Func _MyButtonFunc() ;Go and save! EndFunc I know can be do it using a custom ListView but was just an idea and hope this time i was clear enought Nothing is so strong as gentleness. Nothing is so gentle as real strength
Moderators Melba23 Posted November 23, 2013 Moderators Posted November 23, 2013 PincoPanco,The production version will remain limited to 2 dimensions - mainly because there would be so many arguments as to how to present the 3+D data that it would never satisfy everyone and I am not prepared to put up with the constant moaning that woudl ensue! GerrOrneq,The new version will expand columns to fit the data within them and use scrollbars if the resultant ListView is too wide for the display. I may add some code to limit the maximum width of a column if there is something ridiculously long so that column does not "take over" completely. Sound good? Terenz,Implementing language changes implies a file containing the necessary phrases and a lot of code to select the correct one to use. As the UDF is available as an Autoit script within the Array.au3 include file, there is nothing to stop you amending the button text yourself. Although I would suggest that you make a copy of the include and store it in a personal include folder as explained in the Adding UDFs to AutoIt and SciTE tutorial in the Wiki. I undestand what you want to do with the button - I will look into how this might be implemented, but no promises. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Chimaera Posted November 23, 2013 Posted November 23, 2013 Thx for having a look Melba23 the resizing columns will make it so much better If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
Moderators Melba23 Posted November 23, 2013 Moderators Posted November 23, 2013 All,Please do not post any more suggestions in this thread as I have quite enough ideas to work on. Look out for another thread in the Examples section later today where you will be able to try out and comment on the Beta code. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dickjones007 Posted November 23, 2013 Author Posted November 23, 2013 @jdelaney thanks for the solution, but its not needed anymore for this project. will surely use it in another. @GerrOrneq no problem, i dont mind
BrewManNH Posted November 23, 2013 Posted November 23, 2013 Why would you use a debugging function to access another function from it's Copy Selected button? What possible gain could that give to the debugging function? Wouldn't it make a LOT more sense to build your own function and have it do what you want rather than overcomplicating a function that is to be used only for debugging? After all, this function won't even display a full array if it has more than approximately 64000 rows, and probably a lot less if you're using it in a script that has a GUI with a lot of controls. I say leave the function alone as it is intended to be used as a debugging tool, and nothing else. If you can't create a listview to display your array, then you could always modify this function on your own. It's already far bigger than it needs to be for debugging. 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 GudeHow 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
jdelaney Posted November 23, 2013 Posted November 23, 2013 But that's what's great about these 'open source' functions, you can do whatever you want with them. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
BrewManNH Posted November 23, 2013 Posted November 23, 2013 But that's what's great about these 'open source' functions, you can do whatever you want with them.That's kind of my point, if you need this function to do more, strip it out and build on it. 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 GudeHow 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
Moderators Melba23 Posted November 23, 2013 Moderators Posted November 23, 2013 Gentlemen,Following on from this post, do not even think of starting here as well! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
GerrOrneq Posted November 24, 2013 Posted November 24, 2013 Look in my signature for an alternate Array.au3 UDF file, inside that is an array display that does that. Thank you, had a look, then onto GaryC's, I wasn't aware that there were other versions of arraydisplay, kinda gets confusing! don't it Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown
GerrOrneq Posted November 24, 2013 Posted November 24, 2013 GerrOrneq, The new version will expand columns to fit the data within them and use scrollbars if the resultant ListView is too wide for the display. I may add some code to limit the maximum width of a column if there is something ridiculously long so that column does not "take over" completely. Sound good? M23 "Sound Good?", Indeed, it sounds just the ticket. Thank you. DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown
dickjones007 Posted November 24, 2013 Author Posted November 24, 2013 i need little more debugging for my script: the final code as follows: expandcollapse popup#include <DateTimeConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <Array.au3> #include <File.au3> #include <GUIConstantsEx.au3> Global $novidatum Opt("GUIOnEventMode", 1) HotKeySet("+^x", "izlaz1") #region --- CodeWizard generated code Start --- ;SpashImage features: Title=No, Width=900, Height=400, Always On Top SplashImageOn("", "twisterfun.jpg", "900", "400", "-1", "-1", 1) Sleep(300) SplashOff() #endregion --- CodeWizard generated code Start --- Global $folder = @ScriptDir & "\Izdane kartice\" #region ### GUI section ### #region MENU $Form1_1 = GUICreate("Twisterichne kartice", 624, 450, @DesktopWidth / 2 - 624 / 2, @DesktopHeight / 2 - 450 / 2, $WS_BORDER) $MenuItem1 = GUICtrlCreateMenu("&Izbornik") $MenuItem4 = GUICtrlCreateMenuItem("&Novi unos", $MenuItem1) GUICtrlSetOnEvent($MenuItem4, "svenovo1") $MenuItem9 = GUICtrlCreateMenuItem("&Izdane kartice", $MenuItem1) GUICtrlSetOnEvent($MenuItem9, "izdane1") $MenuItem7 = GUICtrlCreateMenu("&O programu") $MenuItem2 = GUICtrlCreateMenuItem("&Autor", $MenuItem7) GUICtrlSetOnEvent($MenuItem2, "oprogramu1") $MenuItem3 = GUICtrlCreateMenuItem("---------------", $MenuItem1) $MenuItem5 = GUICtrlCreateMenuItem("I&zlaz (Ctrl+x)", $MenuItem1) GUICtrlSetOnEvent($MenuItem5, "izlaz1") #endregion MENU $default = GUICtrlCreateButton("DEFAULT", 300, 0, 60, 15) GUICtrlSetOnEvent($default, "default1") $djelatna = GUICtrlCreateLabel("Djelatnik:", 20, 17, 60, 15) $djelatnici = GUICtrlCreateCombo("", 100, 13, 119, 25) GUICtrlSetData($djelatnici, "Anita Tihi|Nikolina Matanovic", "Anita Tihi") $imeprezime = GUICtrlCreateInput("", 100, 40, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_UPPERCASE)) GUICtrlCreateLabel("Ime i prezime:", 20, 43, 80, 15) #region KONTAKT INFO ;~ $odjelkontakt = GUICtrlCreateGraphic(240, 13, 100, 100) ;~ GUICtrlSetGraphic($odjelkontakt, $GUI_GR_RECT, 0, 23, 364, 126) $kontakt = GUICtrlCreateCombo("", 320, 40, 80, 21) GUICtrlSetData($kontakt, "Majka|Otac|Djed|Baka|Brat|Sestra|Prijatelj|Ocuh|Pomajka|Stric|Strina|Ujak|Ujna|Bratic|Sestricna", "Majka") GUICtrlCreateLabel("Kontakt osoba:", 243, 43, 77, 15) $kontaktime = GUICtrlCreateInput("", 460, 40, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_UPPERCASE)) GUICtrlCreateLabel("Ime:", 410, 43, 40, 15) $kontaktel = GUICtrlCreateInput("", 460, 66, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_UPPERCASE)) GUICtrlCreateLabel("Telefon:", 410, 69, 40, 15) $dodaj = GUICtrlCreateButton("Dodaj kontakt", 243, 90, 80, 25) GUICtrlSetOnEvent($dodaj, "dodaj1") $listakontakt = GUICtrlCreateEdit("", 329, 90, 252, 65,BitOR($ES_READONLY, $WS_VSCROLL)) #endregion KONTAKT INFO $datumrod = GUICtrlCreateDate("2001/01/01", 100, 66, 120, 20, $DTS_SHORTDATEFORMAT) GUICtrlCreateLabel("Datum rodenja:", 20, 69, 80, 15) $adresa = GUICtrlCreateInput("", 100, 91, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_UPPERCASE)) GUICtrlCreateLabel("Ulica i broj:", 20, 94, 80, 15) $posta = GUICtrlCreateInput("", 100, 117, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER, $ES_OEMCONVERT)) GUICtrlSetLimit($posta, 5, 5) GUICtrlCreateLabel("Broj pošte:", 20, 120, 80, 15) $grad = GUICtrlCreateInput("", 100, 143, 120, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_UPPERCASE)) GUICtrlCreateLabel("Grad:", 20, 146, 80, 15) $vrsta = GUICtrlCreateCombo("", 20, 210, 200, 25) GUICtrlSetData($vrsta, "Mjesecna|Polugodisnja|Godisnja", "") GUICtrlSetOnEvent($vrsta, "kartica1") $brojkartlabel = GUICtrlCreateLabel("Broj kartice", 20, 240, 200, 15) $brojkart = GUICtrlCreateInput("", 20, 260, 60, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER)) GUICtrlSetLimit($brojkart, 3, 3) $datum = GUICtrlCreateDate(_NowDate(), 20, 310, 200, 20, $DTS_SHORTDATEFORMAT) $datumizd = GUICtrlCreateLabel("Datum izdavanja kartice", 20, 290, 118, 15) $vrijedido = GUICtrlCreateLabel("Vrijedi do:", 20, 340, 50, 17) $vrijedidoread = GUICtrlCreateInput("", 70, 337, 150, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_READONLY)) $vrstakar = GUICtrlCreateLabel("Vrsta kartice", 20, 190, 200, 15) $spremi = GUICtrlCreateButton("Spremi", 20, 368, 75, 25) GUICtrlSetOnEvent($spremi, "spremi1") GUISetState() #endregion ### GUI section ### ; *** create these here and not over and over in a function $pic = GUICtrlCreatePic("backg.jpg", 240, 14 + 150, 364, 228) While 1 Sleep(10) WEnd Func svenovo1() ;put empty values into fields GUICtrlSetData($imeprezime, "") ;ime prezime GUICtrlSetData($kontaktime, "") ;ime kontakta GUICtrlSetData($kontaktel, "") ;telefon GUICtrlSetData($adresa, "") ;ulicu GUICtrlSetData($posta, "") ;postu GUICtrlSetData($grad, "") ;grad GUICtrlSetData($vrsta, "Mjesecna") ;vrsta kartice GUICtrlSetData($brojkart, "") ;broj kartice GUICtrlSetImage($pic, "backg.jpg") EndFunc ;==>svenovo1 Func default1() ;put default values into fields GUICtrlSetData($imeprezime, "IME I PREZIME") ;ime prezime GUICtrlSetData($kontaktime, "MARIJA") ;ime kontakta GUICtrlSetData($kontaktel, "035/212-055") ;telefon GUICtrlSetData($adresa, "HVARSKA 55") ;ulicu GUICtrlSetData($posta, "35000") ;postu GUICtrlSetData($grad, "SLAVONSKI BROD") ;grad GUICtrlSetData($vrsta, "Polugodisnja") ;vrsta kartice GUICtrlSetData($brojkart, "035") ;broj kartice EndFunc ;==>default1 Func kartica1() Switch GUICtrlRead($vrsta) Case "Mjesecna" GUICtrlSetImage($pic, "mjesecna.jpg") $dodandatum = _DateAdd('M', 1, _NowCalcDate()) $konvdatum = StringSplit($dodandatum, "/") $novidatum = Number($konvdatum[3]) & "." & Number($konvdatum[2]) & "." & StringRight($konvdatum[1], 4) Case "Polugodisnja" GUICtrlSetImage($pic, "polugodisnja.jpg") $dodandatum = _DateAdd('M', 6, _NowCalcDate()) $konvdatum = StringSplit($dodandatum, "/") $novidatum = Number($konvdatum[3]) & "." & Number($konvdatum[2]) & "." & StringRight($konvdatum[1], 4) Case "Godisnja" GUICtrlSetImage($pic, "godisnja.jpg") $dodandatum = _DateAdd('M', 12, _NowCalcDate()) $konvdatum = StringSplit($dodandatum, "/") $novidatum = Number($konvdatum[3]) & "." & Number($konvdatum[2]) & "." & StringRight($konvdatum[1], 4) EndSwitch GUICtrlSetData($vrijedidoread, $novidatum) EndFunc ;==>kartica1 Func dodaj1() If GUICtrlRead($listakontakt) = "" Then GUICtrlSetData($listakontakt, GUICtrlRead($kontakt) & @TAB & GUICtrlRead($kontaktime) & @TAB & GUICtrlRead($kontaktel), 1) Else GUICtrlSetData($listakontakt, @CRLF & GUICtrlRead($kontakt) & @TAB & GUICtrlRead($kontaktime) & @TAB & GUICtrlRead($kontaktel), 1) EndIf EndFunc ;==>dodaj1 Func spremi1() If FileExists($folder) Then Sleep(100) Else DirCreate($folder) EndIf $imeprezimetxt = GUICtrlRead($imeprezime) $datumrodtxt = GUICtrlRead($datumrod) ;~ $kontakttxt = ControlGetText("Twisterichne kartice", "", "[CLASS:Edit; INSTANCE:3]") ;~ $kontaktimetxt = GUICtrlRead($kontaktime) $kontakteltxt = GUICtrlRead($kontaktel) $adresatxt = GUICtrlRead($adresa) $postatxt = GUICtrlRead($posta) $gradtxt = GUICtrlRead($grad) $brojkarttxt = GUICtrlRead($brojkart) $datumizdtxt = GUICtrlRead($datum) $djelatnicitxt = GUICtrlRead($djelatnici) $vrstatxt = ControlGetText("Twisterichne kartice", "", "[CLASS:Edit; INSTANCE:10]") ;~ $vrstatxt = GUICtrlRead($vrstakart) $vrijedidotxt = GUICtrlRead($vrijedidoread) $listakontakttxt = GUICtrlRead($listakontakt) Local $avArray[10][3] = [["IME I PREZIME", $imeprezimetxt, ""],["DATUM ROÐENJA", $datumrodtxt, ""],["KONTAKT OSOBA", @CRLF & $listakontakttxt, ""],["", "", ""],["ULICA I BROJ", $adresatxt, ""],["GRAD/MJESTO", $postatxt, $gradtxt],["BROJ KARTICE", $brojkarttxt, $vrstatxt],["KARTICA IZDANA", $datumizdtxt, ""],["VRIJEDI DO", $vrijedidotxt, ""],["DJELATNICA", $djelatnicitxt, ""]] ;~ _ArrayDisplay($avArray, "Podatci o korisniku kartice") $sFile = FileSaveDialog("Choose a name.", $folder, "Text files (*.txt)", 16, $vrstatxt & "_" & $brojkarttxt & "_" & $imeprezimetxt & ".txt") If @error Then MsgBox(4096, "", "Save cancelled.") Else _FileWriteFromArray($sFile, $avArray, 0, "", " ") svenovo1() EndIf EndFunc ;==>spremi1 Func izdane1() If FileExists($folder) Then Sleep(100) Else DirCreate($folder) EndIf Run("Explorer.exe " & $folder) EndFunc ;==>izdane1 Func oprogramu1() MsgBox(0, "Autor", "Darko Majetic") EndFunc ;==>oprogramu1 Func izlaz1() Exit EndFunc ;==>izlaz1 thing that happens is once i save the data to txt file ("Spremi" button) pics from Func kartica1() dont work anymore. if i cancel the save it is still ok. also is there a way to make hotkeyset work only inside app?
Moderators Melba23 Posted November 24, 2013 Moderators Posted November 24, 2013 dickjones007, is there a way to make hotkeyset work only inside app?Yes - use an Accelerator key which is only active when the parent GUI is active. Look at GUISetAccelerators in the Help file for details. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dickjones007 Posted November 24, 2013 Author Posted November 24, 2013 accelerator implemented. any solution for "pics not changing after save" maybe?
Moderators Melba23 Posted November 24, 2013 Moderators Posted November 24, 2013 dickjones007,When you action button "Premi", the function "spremi1()" is run. In that function when you successfully save, you run function "svenovo1()" in which the content of combo $vrsta are reset (GUICtrlSetData($vrsta, "Mjesecna")). So when you subsequently try to read that combo in function "kartica1()" you do not get the full selection you had before. If that is not the answer then you will have to translate your code into English before I look any deeper. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dickjones007 Posted November 24, 2013 Author Posted November 24, 2013 (edited) thnks melba23 but its not that even when i replace everything between Else and Endif with Sleep(100) it still stops image changes i think it has something to do with SaveDialog finishing its process after clicking Save button on it. its really a minor problem so i wont hastle anyone with it anymore Edited November 24, 2013 by dickjones007
MHz Posted November 25, 2013 Posted November 25, 2013 dickjones007, You are using relative paths. This makes it easy with paths though you need to monitor the current working directory when needed. FileChangeDir, FileOpenDialog and FileSaveDialog can change the working directory. You check the working directory at the point of usage by saving @WorkingDir into a variable, do the task and then using FileChangeDir to restore the working directory. Or you can save the initial working directory at the start of the script and use it later to restore the working directory after the task with FileChangeDir. So you could save at the point of use Local $workingdir = @WorkingDir ; save $sFile = FileSaveDialog("Choose a name.", $folder, "Text files (*.txt)", 16, $vrstatxt & "_" & $brojkarttxt & "_" & $imeprezimetxt & ".txt") ; change If @error Then MsgBox(4096, "", "Save cancelled.") Else _FileWriteFromArray($sFile, $avArray, 0, "", " ") FileChangeDir($workingdir) ; restore svenovo1() EndIf or use initial save at top of script ; top of script Global $StartDir = @WorkingDir ; save ; ... ; ... Func spremi1() ; ... ; ... $sFile = FileSaveDialog("Choose a name.", $folder, "Text files (*.txt)", 16, $vrstatxt & "_" & $brojkarttxt & "_" & $imeprezimetxt & ".txt") ; change If @error Then MsgBox(4096, "", "Save cancelled.") Else _FileWriteFromArray($sFile, $avArray, 0, "", " ") FileChangeDir($StartDir) ; restore svenovo1() EndIf EndFunc ;==>spremi1
dickjones007 Posted November 25, 2013 Author Posted November 25, 2013 excellent stuff MHz thank you for that that just covered from 99% working to a full 100% :)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now