Jump to content

DaProgrammer

Active Members
  • Posts

    144
  • Joined

  • Last visited

Everything posted by DaProgrammer

  1. its a tool to work with and an idea for others to implement i didnt bother to make it pretty and stuff, if u want pretty follow my sig and download the alarm clock its what u might call a finished product, published on Download.com(C.Net)
  2. i made a couple of projects, some of which u can find by following my sig. but mainly thinking of ideas for a big project and plying around in the meantime.
  3. Ever needed to Calculate how much time are all 3 movies together and started to multiply the hours *3600 and the minutes *60, well no more. I present to you the time calculator. Opt("GUIOnEventMode",1) GuiCreate("KJ's TC", 130, 70,-1, -1) GUISetOnEvent(-3,"Exitt") GUICtrlCreateLabel(":",33,12,15,15) GUICtrlCreateLabel(":",63,12,15,15) GUICtrlCreateLabel(":",33,42,15,15) GUICtrlCreateLabel(":",63,42,15,15) $Input_h1 = GuiCtrlCreateInput("", 10, 10, 20, 20) $Input_m1 = GuiCtrlCreateInput("", 40, 10, 20, 20) $Input_s1 = GuiCtrlCreateInput("", 70, 10, 20, 20) $Input_h2 = GuiCtrlCreateInput("", 10, 40, 20, 20) $Input_m2 = GuiCtrlCreateInput("", 40, 40, 20, 20) $Input_s2 = GuiCtrlCreateInput("", 70, 40, 20, 20) $Button_a = GuiCtrlCreateButton("+", 100, 5, 15, 15) $Button_s = GuiCtrlCreateButton("-", 100, 25, 15, 15) $Button_r = GuiCtrlCreateButton("R", 100, 45, 15, 15) GUICtrlSetOnEvent($Button_a,"Add") GUICtrlSetOnEvent($Button_s,"Subtract") GUICtrlSetOnEvent($Button_r,"Reset") GuiSetState() While 1 Sleep(1000) WEnd Func Add() GUICtrlSetData($Input_s1,GUICtrlRead($Input_s1)+GUICtrlRead($Input_s2)) GUICtrlSetData($Input_s2,"") While GUICtrlRead($Input_s1)>=60 GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)+1) GUICtrlSetData($Input_s1,GUICtrlRead($Input_s1)-60) WEnd GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)+GUICtrlRead($Input_m2)) GUICtrlSetData($Input_m2,"") While GUICtrlRead($Input_m1)>=60 GUICtrlSetData($Input_h1,GUICtrlRead($Input_h1)+1) GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)-60) WEnd GUICtrlSetData($Input_h1,GUICtrlRead($Input_h1)+GUICtrlRead($Input_h2)) GUICtrlSetData($Input_h2,"") EndFunc Func Subtract() GUICtrlSetData($Input_s1,GUICtrlRead($Input_s1)-GUICtrlRead($Input_s2)) GUICtrlSetData($Input_s2,"") While GUICtrlRead($Input_s1)<0 GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)-1) GUICtrlSetData($Input_s1,GUICtrlRead($Input_s1)+60) WEnd GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)-GUICtrlRead($Input_m2)) GUICtrlSetData($Input_m2,"") While GUICtrlRead($Input_m1)<0 GUICtrlSetData($Input_h1,GUICtrlRead($Input_h1)-1) GUICtrlSetData($Input_m1,GUICtrlRead($Input_m1)+60) WEnd GUICtrlSetData($Input_h1,GUICtrlRead($Input_h1)-GUICtrlRead($Input_h2)) GUICtrlSetData($Input_h2,"") EndFunc Func Reset() GUICtrlSetData($Input_h1,"") GUICtrlSetData($Input_m1,"") GUICtrlSetData($Input_s1,"") GUICtrlSetData($Input_h2,"") GUICtrlSetData($Input_m2,"") GUICtrlSetData($Input_s2,"") EndFunc Func Exitt() Exit EndFunc
  4. div.au3 ;=============================================================================== ; ; Function Name: _Div() ; Description: Devides $Num by $Devidant. ; Parameter(s): $Num - The Number you are deviding. ; $Devidant - The Number you are deviding by. ; ; $Result[0] - The Whole Result ; $Result[1] - The remainder. ; ; Requirement(s): None. ; Return Value(s): The Whole Number and the remainder. ; @error is set to 1 if Devidant = 0. ; Author(s): KJ ; ;=============================================================================== Func _Div($Num,$Devidant) Local $Result[2] If $Num < 0 Then $Num = -$Num If $Devidant < 0 Then $Devidant = -$Devidant If $Devidant = 0 Then SetError(1) Return EndIf If $Num > $Devidant Then $Result[0] = Floor($Num/$Devidant) $Result[1] = $Num - ($Result[0]*$Devidant) ElseIf $Num = $Devidant Then $Result[0] = 1 $Result[1] = 0 ElseIf $Num < $Devidant Then $Result[0] = 0 $Result[1] = $Num EndIf Return $Result EndFunc Sample.au3 #include "div.au3" $a=_Div(50,9) If @error=0 Then MsgBox(0,"",$a[0] & " " & $a[1]) what u all think ? i personally think it should be addded to the autoit user functions.
  5. $MaxSeconds = 3 $MaxMinutes = 3 $MaxHours = 3 $Seconds = 0 $Minutes = 0 $Hours = 0 $days = 0 GuiCreate("Manual Clock", 100, 50) $Label = GuiCtrlCreateLabel($days & " : " & $Hours & " : " & $Minutes & " : " & $Seconds, 10, 10, 80, 30,0x01) GuiSetState() $Time = TimerInit() While 1 $Seconds = Int(TimerDiff($Time)/1000) - $Minutes*$MaxSeconds - $Hours*$MaxMinutes*$MaxSeconds - $days*$MaxHours*$MaxMinutes*$MaxSeconds If $Seconds = $MaxSeconds Then $Minutes = $Minutes +1 $Seconds = $Seconds - $MaxSeconds If $Minutes = $MaxMinutes Then $Hours = $Hours + 1 $Minutes = $Minutes - $MaxMinutes If $Hours = $MaxHours Then $days = $days + 1 $Hours = $Hours - $MaxHours EndIf EndIf EndIf GUICtrlSetData($Label,$days & " : " & $Hours & " : " & $Minutes & " : " & $Seconds) Sleep(250) WEnd same idea only based on timer instead of PC-Clock choose whatever works best for you
  6. didn't try to make it usefull just cut the code(without the gui) and inplement in your program
  7. If u need to have a 20 second minute or a 10 hour day than u can use this: just set up your "$Max" Values u need and enjoy imbedding it to your apps. $MaxSeconds = 3 $MaxMinutes = 5 $MaxHours = 3 $Seconds = 0 $Minutes = 0 $Hours = 0 $days = 0 GuiCreate("Manual Clock", 100, 50) $Label = GuiCtrlCreateLabel($days & " : " & $Hours & " : " & $Minutes & " : " & $Seconds, 10, 10, 80, 30,0x01) GuiSetState() While 1 W8forSec() $Seconds = $Seconds + 1 If $Seconds = $MaxSeconds Then $Minutes = $Minutes +1 $Seconds = 0 If $Minutes = $MaxMinutes Then $Hours = $Hours + 1 $Minutes = 0 If $Hours = $MaxHours Then $days = $days + 1 $Hours = 0 If $Hours = $MaxHours Then $days = $days + 1 $Hours = 0 EndIf EndIf EndIf EndIf GUICtrlSetData($Label,$days & " : " & $Hours & " : " & $Minutes & " : " & $Seconds) WEnd Func W8forSec() $Time = @SEC While @SEC = $Time Sleep(50) WEnd EndFunc
  8. i worked with arrays in other programming app's but it was never so complicated !!! why cant i use "$Array[0][0] = 52" ??? is there like a guide around here that explains how to work with arrays couse im confused ! will appritiate some help AND/OR link.
  9. Is the something Like "SoundSetWaveVolume()" but to change the Master Volume ?
  10. dammit LOL how did i forgot u have no idea how imberesed i feel right now EDIT : Got it to work
  11. OK now it works when its clean program like this : #include <Date.au3> $Input_Day = 15 $Input_Hour = 12 $Input_Min = 12 $Input_Month = 06 $Input_Year = 2006 If _DateDiff( 's',String($Input_Year) & "/" & String($Input_Month) & "/" & String($Input_Day) & " " & String($Input_Hour) & ":" & String($Input_Min) & ":00",_NowCalc()) > 0 Then MsgBox(0,"",_NowCalc()) but inside Function it doesnt why ? Func Save() If _DateDiff( 's',String($Input_Year) & "/" & String($Input_Month) & "/" & String($Input_Day) & " " & String($Input_Hour) & ":" & String($Input_Min) & ":00",_NowCalc()) > 0 Then Return
  12. ty, its easier this way. now why does this doesnt work : If _DateDiff( 's',$Input_Year & "/" & $Input_Month & "/" & $Input_Day & " " & $Input_Hour & ":" & $Input_Min & ":00",_NowCalc()) > 0 Then Return this wont work either : If _DateDiff( 's',String($Input_Year) & "/" & String($Input_Month) & "/" & String($Input_Day) & " " & String($Input_Hour) & ":" & String($Input_Min) & ":00",_NowCalc()) > 0 Then Return
  13. i have a Date : "19/02/2007" & Time : "12:01:53" i need to check against the PC clock to see if this Moment Has happend or is in the future. EDIT : i found this but it doesnt work :? any1 knows why ? If _DateDiff("s", IniRead2($i2, "Year") & "/" & IniRead2($i2, "Month") & "/" & IniRead2($i2, "Day") & "[" & IniRead2($i2, "Hour") & ":" & IniRead2($i2, "Minute") & ":00]", @YEAR & "/" & @MON & "/" & @MDAY & "[" & @HOUR & ":" & @MIN & ":" & @SEC & "]") > 0 Then Lunch()
  14. Did Some1 write a Func that checks if a date has expired (AKA: has been; old) ? i can write 1 of my own i gess, but i was just wondering if some1 saw anything of the kind ?
  15. elaborate the errors u get so i can fix it as for the no sound try a WAV file ? if a WAV works and other format doesnt than u have bad Codecs. as for no item present, select the item u want to delete/view, i checked the delete a dousen times it works flawlesslee here :?
  16. its in "Example Scripts" couse it was written in AutoIt !
  17. i dont have Vista so IDK how it reacts there SRY
  18. as i said if u want the sorce pm me and ill happily send it to you i just dont want Everyone who enter this site see my source and use it for something, if u want to see it or use a part of it just ask and if u have a few posts over 0 than ill probably give it to you
  19. the reaction between "WinSetTrans()" and "Windows" is buggy so it has abit of problems with the desktop and start bar, as far as i know thats all. i have no idea how to fix it but it works pretty smooth for me.
  20. np m8 just dont forget to share your project LOL
  21. Got bored and decided to play around with window trancperency so enjoy this little tool $win = WinGetHandle("[Active]") While 1 WinSetTrans($win,"",255) $win = WinGetHandle("[Active]") WinSetTrans($win,"",200) While $win = WinGetHandle("[Active]") Sleep(100) WEnd WEnd Func OnAutoItExit() WinSetTrans($win,"",255) EndFunc
  22. the Version : 1.1 is old and might be wrong IDK, so run the 1.4 i just updated it.
  23. New Version 1.4 Released !
  24. u run the au3 or exe ?
×
×
  • Create New...