Jump to content

Charlz

Members
  • Posts

    10
  • Joined

  • Last visited

Charlz's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. okay guys, I fixed the file and it is working beautifully! Thanks
  2. okay, thanks I will that
  3. Hey guys, I have been trying to make a script which requests some information and writes it to a notepad file after the information is entered... The whole script runs smoothly (variables, etc) except for the opening of the file/writing to the file.. I have tried Run and FileWriteLine, both with the same results... Was hoping that you could help me on this one (I need this done soon... its a bit important, thanks) Thanks for any feedback and help I have put the script below ; Project: input hours ;means - notepad tracker? If 2 = MsgBox (1,"TimeTracker","Welcome, would you like to begin?") then Exit ;vars $date = InputBox ("TimeTracker","Input date and day"&@CRLF&"format [DAY] - [DATE]") $phys = InputBox ("TimeTracker","Input hours done of Physics") $chem = InputBox ("TimeTracker","Input hours done of Chemistry") $math = InputBox ("TimeTracker","Input hours done of Math") $file = FileOpen ("G:\StudyHours.txt",1) if $file = 1 Then FileWriteLine ("G:\StudyHours.txt",@CRLF&@CRLF&$date&@CRLF&$phys&@CRLF&$chem&@CRLF&$math) MsgBox (0,"TimeTracker","Done! :D") ElseIf $file = 0 Then MsgBox (0,"TimeTracker","Sorry, file not found @_@") EndIf Exit (The error in this case occurred at the file open, it said that it could not either open the file, or find it...)
  4. whoops ~_~ Just went through the script again (counting the brackets, thnx Euler) and it works perfectly! Thanks again people!
  5. Firstly, you have my gratitude for helping with the previous problem, but alas, another has come up.... I tried to use "Asin" to find the value of an angle, however a snytax error comes up when I do this.. Global $angX1 = ASin (($x * Sin ($angZ * $degToRad)/$z) Global $angX2 = ASin (($x * Sin ($angY * $degToRad)/$y) Global $angY1 = ASin (($y * Sin ($angZ * $degToRad)/$z) Global $angY2 = ASin (($y * Sin ($angX * $degToRad)/$x) Global $angZ1 = ASin (($z * Sin ($angY * $degToRad)/$y) Global $angZ2 = ASin (($z * Sin ($angX * $degToRad)/$x) please help
  6. aaaahhhh... I understand now... Thanks, apparently I have much to learn
  7. Thanks for the tip! I tried to make all the variables "global" hoping it would work... But yea, your idea should work!!! Thanks man!!
  8. whats wrong with using something like $pass = InputBox ("","input password","","*") if $pass = "password" Then MsgBox (1,"","correct") Else Exit EndIf (hey, I am relatively new here, but I would love any suggestions! ) BTW is it possible to create a "username - password" database which Autoit could read from, and others could create new "accounts"?
  9. Quick note; Any and all help/suggestions are very welcome! Thanks!!
  10. Heya there! For starters, I am somewhat new to Autoit, but I can still make a program or two.... However, recently I have tried to make a program which would solve basic Trigonometry problems (so I can give it as a parting gift to some of my friends ) This program is meant to work out the side measurements and angles of triangles in general, using the laws of sine. When I use the "Go" function in SciTe, there were no reported errors, so I compiled the file... Ran the program, input the values (sufficient to solve for the rest), but an error comes up that one of the variables was not declared, even after I ran through the whole script numerous times.... (a copy of the script is available, in case the following does not work...) ;TRIG HELPER PROGRAM - SINE ;vars = x,y,z angX, angY,angZ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Vars $x = InputBox ("Trig Helper - Sine","input value of side 'x' (opposite angle X)"&@CRLF&"If there is no value, input 'x'") $y = InputBox ("Trig Helper - Sine","input value of side 'y' (opposite angle Y)"&@CRLF&"If there is no value, input 'x'") $z = InputBox ("Trig Helper - Sine","input value of side 'z' (opposite angle Z)"&@CRLF&"If there is no value, input 'x'") $angX = InputBox ("Trig Helper - Sine","input value of angle 'X' (opposite side x)"&@CRLF&"If there is no value, input 'x'") $angY = InputBox ("Trig Helper - Sine","input value of angle 'Y' (opposite side y)"&@CRLF&"If there is no value, input 'x'") $angZ = InputBox ("Trig Helper - Sine","input value of angle 'Z' (opposite side z)"&@CRLF&"If there is no value, input 'x'") ;Vars end MsgBox (1,"Trig Helper - Sine","The following info is what was input"&@CRLF&"side x = "&$x&" / "&"Angle X = "&$angX&@CRLF&"side y = "&$y&" / "&"Angle Y = "&$angY&@CRLF&"side z = "&$z&" / "&"Angle Z = "&$angZ) ;COMPUTATION SECTION $pi = 3.14159265358979 $degToRad = $pi / 180 if $x = "x" Then $valx1 = (($y * Sin ($angX * $degToRad)/Sin($angY * $degToRad))) $valx2 = (($z * Sin ($angX * $degToRad)/Sin($angZ * $degToRad))) EndIf if $y = "x" Then $valy1 = (($x * Sin ($angY * $degToRad)/Sin($angX * $degToRad))) $valy2 = (($z * Sin ($angY * $degToRad)/Sin($angZ * $degToRad))) EndIf if $z = "x" Then $valz1 = (($x * Sin ($angZ * $degToRad)/Sin($angX * $degToRad))) $valz2 = (($y * Sin ($angZ * $degToRad)/Sin($angY * $degToRad))) EndIf ;COMPUTATION SECTION END MsgBox (1,"Trig Helper - Sine","The following has been solved"&@CRLF&"If there are two values for any side/angle, then the non-zero value is the correct one"&@CRLF&"side x = "&$valx1&" / "&$valx2&" /~\ "&"Angle X = "&$angX&@CRLF&"side y = "&$valy1&" / "&$valy2&" /~\ "&"Angle Y = "&$angY&@CRLF&"side z = "&$valz1&" / "&$valz2&" /~\ "&"Angle Z = "&$angZ) Exit Trig helper - Sine ALT.au3
×
×
  • Create New...