Jump to content

Hideous

Members
  • Posts

    9
  • Joined

  • Last visited

Hideous's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I got a question about your UDF, is it possible to edit the specified details and save them afterwards? It would be awsome for use when you want to edit your song information or anything like that
  2. Heya! After some scripting I worked the next script out #include <GUIConstants.au3> #include <Array.au3> #include <GuiListView.au3> Opt("GUIOnEventMode", 1) Dim $Customer_Array[3] $Customer_Array[0] = "Pascal Hendrikse | Voorschoten" $Customer_Array[1] = "Peter Jansen | Leiden" $Customer_Array[2] = "Jhon Peters | Voorschoten" $GUI = GUICreate("Customers", 600, 400, 100, 100, -1, $WS_EX_ACCEPTFILES) $ListView1 = GUICtrlCreateListView("Name |City ", 10, 10, 580, 300, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_FULLROWSELECT)) for $i=0 to UBound($Customer_Array)-1 GUICtrlCreateListViewItem($Customer_Array[$i],$listview1) Next GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount ($listview1) ] GUISetOnEvent($GUI_EVENT_CLOSE, "Close") GUICtrlSetOnEvent( $Listview1, "ArraySort" ) While 1 sleep(10) WEnd Func ArraySort() _GUICtrlListViewSort($listview1,$B_DESCENDING,GUICtrlGetState($listview1)) EndFunc Func Close() Exit EndFunc I'm gratefull to you thank you rlly!
  3. Hi there! Since i was trying all kind of stuff to get the code to work ( and apparently.. it didnt worked out ) I thought off asking the pro's . I need to write an array to a listview item ( see code )... #include <GUIConstants.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) Dim $Customer_Array[3] $Customer_Array[0] = "Pascal Hendrikse" $Customer_Array[1] = "Peter Jansen" $Customer_Array[2] = "Jhon Peters" $GUI = GUICreate("Customers", 600, 400, 100, 100 ) $ListView1 = GUICtrlCreateListView("Name ", 10, 10, 580, 300, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_FULLROWSELECT)) GUICtrlSetData( $Listview1, $Customer_Array ) GUICtrlSetResizing(-1, 100) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "Close") While 1 sleep(10) WEnd Func ArraySort() _ArraySort( $Customer_Array ) GUICtrlSetData( $Listview1, $Customer_Array ) EndFunc Func Close() Exit EndFunc
  4. Thnx for the Chr(34) tip , wasn't aware of that possibility
  5. I made this program because I self had some problems on getting the right icon on my buttons Hope it's usefull for some of the starting scripters CODE #include <GUIconstants.au3> #NoTrayIcon Opt("GUIOnEventMode", 1) $GUI = GuiCreate("Shell32.dll", 310, 210,-1, -1 ) $Button_1_counter = 0 $Button_2_counter = 1 $Button_3_counter = 2 $Button_4_counter = 3 $Edit_1 = GUICtrlCreateInput( "", 10, 110, 290, 20 ) $Edit_2 = GUICtrlCreateInput( "", 10, 160, 290, 20 ) $Button_1 = GuiCtrlCreateButton("", 60, 10, 40, 40, BitOR( $BS_ICON, $BS_FLAT)) GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", $Button_1_counter) Sleep(10) $Button_2 = GuiCtrlCreateButton("", 110, 10, 40, 40, BitOR( $BS_ICON, $BS_FLAT)) GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", $Button_2_counter) Sleep(10) $Button_3 = GuiCtrlCreateButton("", 160, 10, 40, 40, BitOR( $BS_ICON, $BS_FLAT)) GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", $Button_3_counter) Sleep(10) $Button_4 = GuiCtrlCreateButton("", 210, 10, 40, 40, BitOR( $BS_ICON, $BS_FLAT)) GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", $Button_4_counter) $Button_Prev = GUICtrlCreateButton( "<<", 110, 60, 40, 20, $BS_FLAT) GUICtrlSetState( -1, $GUI_DISABLE ) $Button_Next = GUICtrlCreateButton( ">>", 160, 60, 40, 20, $BS_FLAT) GUICtrlSetOnEvent( $Button_Next, "NextItem" ) GUICtrlSetOnEvent( $Button_Prev, "PrevItem" ) GUICtrlSetOnEvent( $Button_1, "Button_1" ) GUICtrlSetOnEvent( $Button_2, "Button_2" ) GUICtrlSetOnEvent( $Button_3, "Button_3" ) GUICtrlSetOnEvent( $Button_4, "Button_4" ) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitBrowser") GuiSetState() While 1 Sleep(10) WEnd Func NextItem() Select Case $Button_4_counter = 233 GUICtrlSetState( $Button_Next, $GUI_DISABLE ) GUICtrlSetState( $Button_Prev, $GUI_ENABLE ) Case $Button_4_counter = 232 $Button_1_counter = $Button_1_counter + 1 GUICtrlSetImage( $Button_1, @SystemDir & "/shell32.dll", $Button_1_counter) $Button_2_counter = $Button_2_counter + 1 GUICtrlSetImage( $Button_2, @SystemDir & "/shell32.dll", $Button_2_counter) $Button_3_counter = $Button_3_counter + 1 GUICtrlSetImage( $Button_3, @SystemDir & "/shell32.dll", $Button_3_counter) $Button_4_counter = $Button_4_counter + 1 GUICtrlSetImage( $Button_4, @SystemDir & "/shell32.dll", $Button_4_counter) GUICtrlSetState( $Button_Next, $GUI_DISABLE ) GUICtrlSetState( $Button_Prev, $GUI_ENABLE ) Case $Button_4_counter < 232 $Button_1_counter = $Button_1_counter + 1 GUICtrlSetImage( $Button_1, @SystemDir & "/shell32.dll", $Button_1_counter) $Button_2_counter = $Button_2_counter + 1 GUICtrlSetImage( $Button_2, @SystemDir & "/shell32.dll", $Button_2_counter) $Button_3_counter = $Button_3_counter + 1 GUICtrlSetImage( $Button_3, @SystemDir & "/shell32.dll", $Button_3_counter) $Button_4_counter = $Button_4_counter + 1 GUICtrlSetImage( $Button_4, @SystemDir & "/shell32.dll", $Button_4_counter) GUICtrlSetState( $Button_Prev, $GUI_ENABLE ) EndSelect EndFunc Func PrevItem() Select Case $Button_1_counter = 0 GUICtrlSetState( $Button_Prev, $GUI_DISABLE ) GUICtrlSetState( $Button_Next, $GUI_ENABLE ) Case $Button_1_counter = 1 $Button_1_counter = $Button_1_counter - 1 GUICtrlSetImage( $Button_1, @SystemDir & "/shell32.dll", $Button_1_counter) $Button_2_counter = $Button_2_counter - 1 GUICtrlSetImage( $Button_2, @SystemDir & "/shell32.dll", $Button_2_counter) $Button_3_counter = $Button_3_counter - 1 GUICtrlSetImage( $Button_3, @SystemDir & "/shell32.dll", $Button_3_counter) $Button_4_counter = $Button_4_counter - 1 GUICtrlSetImage( $Button_4, @SystemDir & "/shell32.dll", $Button_4_counter) GUICtrlSetState( $Button_Prev, $GUI_DISABLE ) GUICtrlSetState( $Button_Next, $GUI_ENABLE ) Case $Button_1_counter > 1 $Button_1_counter = $Button_1_counter - 1 GUICtrlSetImage( $Button_1, @SystemDir & "/shell32.dll", $Button_1_counter) $Button_2_counter = $Button_2_counter - 1 GUICtrlSetImage( $Button_2, @SystemDir & "/shell32.dll", $Button_2_counter) $Button_3_counter = $Button_3_counter - 1 GUICtrlSetImage( $Button_3, @SystemDir & "/shell32.dll", $Button_3_counter) $Button_4_counter = $Button_4_counter - 1 GUICtrlSetImage( $Button_4, @SystemDir & "/shell32.dll", $Button_4_counter) GUICtrlSetState( $Button_Next, $GUI_ENABLE ) EndSelect EndFunc Func Button_1() GUICtrlSetData( $Edit_1, 'GuiCtrlCreateButton( "", 10, 10, 40, 40, $BS_ICON )') GUICtrlSetData( $Edit_2, 'GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", ' & $Button_1_counter & ' )' ) EndFunc Func Button_2() GUICtrlSetData( $Edit_1, 'GuiCtrlCreateButton( "", 10, 10, 40, 40, $BS_ICON )') GUICtrlSetData( $Edit_2, 'GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", ' & $Button_2_counter & ' )' ) EndFunc Func Button_3() GUICtrlSetData( $Edit_1, 'GuiCtrlCreateButton( "", 10, 10, 40, 40, $BS_ICON )') GUICtrlSetData( $Edit_2, 'GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", ' & $Button_3_counter & ' )' ) EndFunc Func Button_4() GUICtrlSetData( $Edit_1, 'GuiCtrlCreateButton( "", 10, 10, 40, 40, $BS_ICON )') GUICtrlSetData( $Edit_2, 'GUICtrlSetImage( -1, @SystemDir & "/shell32.dll", ' & $Button_4_counter & ' )' ) EndFunc Func ExitBrowser() Exit EndFunc
  6. Think this post can use a bump again very nice help file LxP Very usefull to newbies ( like me <- only used java for programming )
  7. That did it , didnt knew there was a big difference between ASCII and using {key}. Thnx for the fast reply I will post the program as soon it is ready.
  8. Hi there, i've been looking at the forums for my problem but couldnt get the script to work #include <GUIConstants.au3> #include <controlsendplus.au3> GUICreate("StOrFoxx", 800, 600, "", "") $html = GUICtrlCreateButton("<HTML>", 620, 50, 60, 20, $BS_FLAT) $endhtml = GUICtrlCreateButton("/", 690, 50, 30, 20, $BS_FLAT) $body = GUICtrlCreateButton("<BODY>", 620, 80, 60, 20, $BS_FLAT) $endbody = GUICtrlCreateButton("/", 690, 80, 30, 20, $BS_FLAT) $edit = GUICtrlCreateEdit( "", 10, 50, 600, 540 ) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $html ControlSendPlus( "StOrFoxx", "", $edit, "<HTML>", 0 ) Case $msg = $endhtml ControlSendPlus( "StOrFoxx", "", $edit, "</HTML>", 0 ) Case $msg = $body ControlSendPlus( "StOrFoxx", "", $edit, "<BODY>", 0 ) Case $msg = $endbody ControlSendPlus( "StOrFoxx", "", $edit, "</BODY>", 0 ) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd As you see I'm making a program to help starting webdesigners learning HTML. When I click on a button it will add the text to $edit, but I need to have a {enter} after it so it continues at the next line in $edit. For example: I press the button for creating the <html> tag in the $edit, this comes at line 1. After that I'll press the button for the <body> tag, with destination line 2 I'm using the ControlSendPlus() function.. ( Thanks ) I would be gratefull if anyone knows the answer on this question Edit: Added the include controlsendplus.au3 controlsendplus.au3
×
×
  • Create New...