Jump to content

Newbercase

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Newbercase

  1. Welcome to the Autoit forums bashar! Yes there are several videos on Youtube.com The wiki has also has some good examples which can be found here.
  2. I downloaded and tested your code on XP SP-3 and it works! Not sure what would be causing the problem with Windows 7 As Water has pointed out that you may need to find out what is causing the error and blocking the script from running on Win7
  3. Thank monoscout999 for the kind words! However, I've learned a lot from your codes that you have posted here on the forms :} Here is the full working version and disregard the top post #include <Constants.au3> #include <GuiConstants.au3> #include <GuiConstantsEx.au3> #include <GuiListView.au3> Opt('MustDeclareVars', 1) Local $main_GUI, $main_listView $main_GUI = GuiCreate ("Sample GUI", 400, 400) GuiSetIcon (@SystemDir & "\mspaint.exe", 0) $main_listView = GuiCtrlCreateListView ("", 10, 10, 380, 200) _GUICtrlListView_AddColumn ($main_listView, "", -1);<-------------Add a dummy and set to far left _GUICtrlListView_AddColumn ($main_listView, "Time", 100) _GUICtrlListView_AddColumn ($main_listView, "Description", 100) _GUICtrlListView_SetColumnWidth ($main_listView, 1, $LVSCW_AUTOSIZE_USEHEADER) GuiCtrlCreateListViewItem ("|A|One", $main_listView) GuiCtrlCreateListViewItem ("|B|Two", $main_listView) GuiCtrlCreateListViewItem ("|C|Three", $main_listView) _GUICtrlListView_SetBkColor ($main_listView, $CLR_BLACK) _GUICtrlListView_SetTextColor ($main_listView, $CLR_WHITE) _GUICtrlListView_SetTextBkColor ($main_listView, $CLR_MONEYGREEN) GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd
  4. sergeyWolf Try this and see if this is what you want Look for the comment Add a dummy and set to far left #include <Constants.au3> #include <GuiConstants.au3> #include <GuiConstantsEx.au3> #include <GuiListView.au3> Opt('MustDeclareVars', 1) Local $main_GUI, $main_listView, $item1 $main_GUI = GuiCreate ("Sample GUI", 400, 400) GuiSetIcon (@SystemDir & "\mspaint.exe", 0) $main_listView = GuiCtrlCreateListView ("", 10, 10, 380, 200) _GUICtrlListView_AddColumn ($main_listView, "",-1, 0);<-------------Add a dummy and set to far left _GUICtrlListView_AddColumn ($main_listView, "time",100, 0) _GUICtrlListView_AddColumn ($main_listView, "description", 100, 0) _GUICtrlListView_SetColumnWidth ($main_listView, 1, -1) $item1 = GuiCtrlCreateListViewItem ("A|One", $main_listView) _GUICtrlListView_SetItemIndent($main_listView, 1, 0) GuiCtrlCreateListViewItem ("B|Two", $main_listView) GuiCtrlCreateListViewItem ("C|Three", $main_listView) _GUICtrlListView_SetBkColor ($main_listView, $CLR_BLACK) _GUICtrlListView_SetTextColor ($main_listView, $CLR_WHITE) _GUICtrlListView_SetTextBkColor ($main_listView, -1) _GUICtrlListView_SetTextBkColor ($main_listView, $CLR_MONEYGREEN) GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd Hope this helps!
  5. BlackID I would suggest you find topics on server/clients by searching for them on Autoit forums. Here is some links to help you get started or or Or search for Chat Server or just chat. Hope this helps
  6. Here is one from the main loop #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $aCursorInfo $Form1 = GUICreate("Clear Inputs", 170, 135, -1, -1) $Input1 = GUICtrlCreateInput("Default 1", 24, 32, 121, 21) $Input2 = GUICtrlCreateInput("Default 2", 24, 64, 121, 21) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input1 Then GUICtrlSetData($Input1, "") Else If Not $aInfo[4] = $Input1 Then GUICtrlSetData($Input1, "Default 1") EndIf If $aInfo[4] = $Input2 Then GUICtrlSetData($Input2, "") Else If Not $aInfo[4] = $Input2 Then GUICtrlSetData($Input2, "Default 2") EndIf EndIf EndIf EndIf WEnd P.S nice UDF rover! Thank you!
  7. Damein This looks like the start of something good:} I removed all step +1 your code should look like this For $i = 2 To 7000 $MovieGenre[$i] = IniRead("Movie Database.ini", $Movie[$i], "Genre", "Not found") If $MovieGenre[$i] = "Not Found" Then ExitLoop EndIf Next For $i = 2 To 7000 $MovieKidStatus[$i] = IniRead("Movie Database.ini", $Movie[$i], "KidOrNot", "Not found") If $MovieKidStatus[$i] = "Not Found" Then ExitLoop EndIf Except this line 85 you will need this Step -1 For $NumberOfPagesToMake = $NumberOfMovies To 0 Step -1 After I removed all the step +1 from your script, I got it to work without the duplicates. Give it a shot and see if you get the same results:]
  8. Is this what you want? #include <GuiConstants.au3> Global $Msg, $tmsg, $WM_NOTIFY ; ============ Tray Items Start ============ ; 1= prmarydown or left click Opt("TrayMenuMode", 1) ; Set tray Icon TraySetIcon("Shell32.dll", -87) ;only show the menu when prmarydown or left click TraySetClick(1) ; Put some Items in the tray $RestoreTray = TrayCreateItem("Restore") $ExitTray = TrayCreateItem("Exit") ; ============ Gui Items Start ============ $hGui = GUICreate("Minimize Test") GUISetState() ; Declare your varibles Opt('MustDeclareVars', 1) While 1 ;Guiloop $Msg = GUIGetMsg() Switch $Msg Case -3 Exit Case $GUI_EVENT_MINIMIZE _GuiMinimizeToTray($hGui) EndSwitch ; switch to get tray messages $tmsg = TrayGetMsg() Switch $tmsg Case $RestoreTray WinSetState($hGui, "", @SW_RESTORE) Case $ExitTray GUIDelete($hGui) ExitLoop EndSwitch WEnd Func _GuiMinimizeToTray($h_wnd) ; check if 1 = Window exists, then check to see if its 16 = Window is minimized If BitAND(WinGetState($h_wnd), 1) Or Not BitAND(WinGetState($h_wnd), 16) Then ; change the window state to hide WinSetState($h_wnd, "", @SW_HIDE) EndIf EndFunc ;==>_GuiMinimizeToTray P.S Nice example Melba
  9. Yes! I have built a gui around this one that z0mgItsJohn wrote sometime back. Then true modified the code by adding encryption using AES.au which can be found I've coded a control panel for login to be used for Local Area Network and Wide Area Network, So far I've come to a crossroad to go with Html or RichEdit for the animated emoticons. I will release this code on the Autoit forums after I complete it.
  10. Hi JohnOne; and thanks for your response! Yes that would be one way of doing it but it would be the long way around. It would take a lot more code to do the same thing. (1,000 lines of code compared to 10,000) I was hoping that someone solved this problem.
  11. Hi guys -n- gals! Does anyone know how to create a RichEdit control to display animated emoticons like MSN Messenger's. I searched the forums but could not find anything regarding this subject. However, I did find trancexx's GIFAnimation.au3 UDF. After Doing a web search I found this Here for VB but unfortunately, I'm just learning Autoit so VB is a bit much for me right now. I did try to use trancexx's UDF and it works but when you close it down the memory goes to 100%. Thanks #AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <WindowsConstants.au3> #include <GIFAnimation.au3> #include <GuiRichEdit.au3> #include <ButtonConstants.au3> Opt("MustDeclareVars", 1) Global $sTempFolder = @TempDir & "\GIFS" TrayTip("GIF Download", "Please wait while gifs are downloaded and processed", 0) DirCreate($sTempFolder) Global $sFile = $sTempFolder & "\smiley-computer012.gif" If Not FileExists($sFile) Then InetGet("http://www.freesmileys.org/smileys/smiley-computer012.gif", $sFile) Global $hGIF, $hRichEdit GUICtrlSetTip($hGIF, "Hit him") Global $hGui = GUICreate("GIF Animations", 670, 520, -1, -1, $WS_OVERLAPPEDWINDOW) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) Global $hButton = GUICtrlCreateButton("MsgBox", 370, 490, 100, 25) Global $hGIF2 = _GUICtrlCreateGIF($sFile, "", 10, 10) _GUICtrlRichEdit_AppendText($hRichEdit, $hGIF2) _GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "") _GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "This is appended text.") GUICtrlSetResizing($hButton, 802) TrayTip("", "", 0) GUIRegisterMsg(15, "_ValidateGIFs"); WM_PAINT GUISetState() Global $aSize, $aDimension While 1 Switch GUIGetMsg() Case -3 Exit Case $hButton MsgBox(64, "Some title", "Just to see is the gifs are blocked by this and vice versa.", 0, $hGui) GUICtrlDelete($hGIF2) EndSwitch WEnd Func _ValidateGIFs($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_ValidateGIF($hGIF) EndFunc ;==>_ValidateGIFs
×
×
  • Create New...