Jump to content

chun914

Active Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by chun914

  1. thanks.. M23, finally get it done by *100 and compare using int($a) = int($
  2. i have to check if the sum + 450 = $p....... if $childsum + 450 = $p Then msgbox(0,"","so something") Else msgbox(0,"","oops") EndIf
  3. I have some numbers like below and the final $temp amount should be 450 exact but the calculation ended up with 450.00000000001.. i have no idea what's going wrong ? $p = 4592.05 $1 = 679.41 $2 = 661.31 $3 = 660.04 $4 = 648.06 $5 = 963.85 $6 = 529.38 $childsum = 0 $childsum += $1 msgbox(0,"",$childsum) $childsum += $2 msgbox(0,"",$childsum) $childsum += $3 msgbox(0,"",$childsum) $childsum += $4 msgbox(0,"",$childsum) $childsum += $5 msgbox(0,"",$childsum) $childsum += $6 msgbox(0,"",$childsum) $temp = $p -$childsum msgbox(0,"",$temp)
  4. thanks so much the tiptext is excellent.. I'm now working to set allowed char for multiple input box..... still playing with the code to get it done... And i'm get lost on the stringregexp function....... i want to set the input only allow 0-9 and a decimal point "." which only 2 decimal place is allowed found one which is very close but i don't need negative "-" at start and "," to seperate the numbers. If Not StringRegExp($sText, '^(-)?(\d*\.\d{0,' & $iMaxDecimalCount & '}|(\d{1,3}|^)(?:,\d{0,3})+(?:(?<=\d{3})\.\d{0,' & $iMaxDecimalCount & '})?|\d*)$') Then
  5. one more question is it possible to show the tip text when user entered a not allowed char ?
  6. how to make it works for more than 1 input... $input1 $input2 $input3 I'm not sure how can i set the parameter, thanks
  7. any way to make this table editable on the GUI?
  8. thanks so much..... i have it done $n1 = "125,456.12" $n1=StringReplace($n1,",","") $n1=number($n1)
  9. i have some string from a windows thats read like "123,456,789.12" "213.00" "45,678.00" it was read as string but i need to do some calculation on the numbers... how can i convert those strings into integer ??
  10. 1, my child win is always display on the top of the main windows, even if the main windows is activated. The child windows still on the top of the main windows. Any options i can make the main windows at top when it's activated ? 2. anyway to add the function when mouse pointer is over a listview item. And the width is not enough. A little boxes is displayed.
  11. yeah..thanks so much
  12. It was the example code from the help file. when one of the tab is clicked...the wintitle will be changed.
  13. how can i perform the winsettitle function in a on event mode #include <GUIConstants.au3> GUICreate("My GUI Tab",250,150); will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab=GUICtrlCreateTab (10,10, 200,100) $tab0=GUICtrlCreateTabitem ("tab0") GUICtrlCreateLabel ("label0", 30,80,50,20) $tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20) $tab0input=GUICtrlCreateInput ("default", 80,50,70,20) $tab1=GUICtrlCreateTabitem ( "tab----1") GUICtrlCreateLabel ("label1", 30,80,50,20) $tab1combo=GUICtrlCreateCombo ("", 20,50,60,120) GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon $tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20) $tab2=GUICtrlCreateTabitem ("tab2") GUICtrlSetState(-1,$GUI_SHOW); will be display first GUICtrlCreateLabel ("label2", 30,80,50,20) $tab2OK=GUICtrlCreateButton ("OK2", 140,50,50) GUICtrlCreateTabitem (""); end tabitem definition GUICtrlCreateLabel ("Click on tab and see the title", 20,130,250,20) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop if $msg = $tab then ; display the clicked tab if GUICtrlread ($tab) = 0 then WinSetTitle("My GUI Tab","","My GUI Tab0") if GUICtrlread ($tab) = 1 then WinSetTitle("My GUI Tab","","My GUI Tab1") if GUICtrlread ($tab) = 2 then WinSetTitle("My GUI Tab","","My GUI Tab2") EndIf Wend
  14. thanks.. it's a similar problem i have.. and it's sloved now with one more line before _GUICtrlListView_DeleteAllItems CODE$hWnd = GUICtrlGetHandle($importlistview)_GUICtrlListView_DeleteAllItems($hWnd)
  15. With the GUIlistview -> Deleteallitems not working. and don't not want to use the beta version. I'd like to delete the listview and create it again...but the problem is the existing listview is under a tabitem. when i create the listview again...it's on the main GUI and cover all tabitem. Is there any way i can create a listview under existing tabitem ?
  16. Is it possible to open a new windows explorer and perform a file search in c:\ ?
  17. hi all, i want to check if a excel file is opened . if WinExists("Microsoft Excel - test","") then $oExcel = ?? else $oExcel = _ExcelBookOpen("c:\test.xls") endif i don't know how to get the object if file is opened..
  18. thanks so much
  19. I'd like to calculate the date.. the format i have is . YYMMDD is that any easy way just to subtract it by 1 day..... e.g. 070501 - 1 ,, result = 070430 is there any method to convert YYMMDD to a format that can be calculated... i don't want to have too many ''select,case' if then'' with YYMMDD
  20. WOOHOO ,, it works very well... as it can handle by EXE , no problem for other application having same title. thanks soooooo much
  21. i like the get a handle with given classname.... case like this.. there may be 4 possible win title with title contain a user input number ( telephone number ) Title: ABC - 12345678 [old] - MMM - Active Class: AfxFrameOrView70u Title: 12345678 [old] - MMM - Active Class: AfxFrameOrView70u Title: ABC - 12345678 - MMM - Active Class: AfxFrameOrView70u Title: 12345678 - MMM - Active Class: AfxFrameOrView70u there will be more than one windows opend...with the same classname...but differ telephone number. So,, the question is . how can i get handel to the windows i want. if i use $handle = WinGetHandle("classname = AfxFrameOrView70u") afraid it may get handle of other win. can i get handle with both title contain the "12345678" and all classname = AfxFrameOrView70u ?? i may be possible that other application having the wintitle contain "12345678"
  22. Are there any ways to match only the win title, but not the visible window text Matches partial titles from the start, and ignore the visable text. for example.. 2 windows window title : ABC - 12345678 [orginal] - DEF - Active window title : ABC - 23456789 [copy] - DEF - Active program will read the no. "12345678" | "23456789" from file and open the windows winactive("ABC - " & $number, "") but there'll be some error window pop up from the : ABC - 23456789 [copy] - DEF - Active that window will have the title : Error now.. i check for WinExists("Error","") but ^ this code always look into other window's visible text, and cause error.... is there any way i can check only title = "Error" and do not look into the visible text ?
  23. COOL...thanks.....
  24. I set a always on top GUI that show progress ( program is running ) like below ( code copy from this forum) $jj=0 GUISetState(@SW_DISABLE, $mainwindow) $progressttt = GUICreate("Progress",210,33, 800,600,$WS_POPUP,$WS_EX_TRANSPARENT) $progressbar1 = GUICtrlCreateProgress (2,2,200,20,$PBS_SMOOTH) GUICtrlSetBkColor(-1,0xFFFFFF) GUICtrlSetColor(-1,0xff0000) GUISetState (@SW_SHOW) SetWindowPos($progressttt, $HWND_TOPMOST, 0, 0, 0, 0, BitOR($SWP_NOMOVE,$SWP_NOSIZE)) ;begin of code... IF $a = $b then . . . endif ;when the program finish running SetWindowPos($progressttt, $HWND_NOTOPMOST, 0, 0, 0, 0, BitOR($SWP_NOMOVE,$SWP_NOSIZE)) GUIDelete($progressttt) GUISetState(@SW_SHOW, $mainwindow) GUISetState(@SW_ENABLE, $mainwindow) what i'm now doing is add the following code inside the code. GUICtrlSetData ($progressbar1,$jj) Sleep(20) $jj += 1 if $jj = 100 then $jj = 0 is there any way i can keep the progressbar keep running with using this stupid method ?
  25. I can do it when i add... $ES_WANTRETURN
×
×
  • Create New...