Jump to content

Hello Me You

Active Members
  • Posts

    140
  • Joined

  • Last visited

Hello Me You's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. Can I link labels to a website?
  2. I can't automate it because it has button with same control id.. I don't have much time now, sorry. Does anyone have a script for it? Many users use it.
  3. Thanks BigDod, finally I am done. What do you think, is it complete (for algorithm)? Here it is: Do $a = InputBox("Side A", "Length of side A (cm)", "Numbers Only") If @error = 1 Then Exit If StringIsAlpha($a) Then MsgBox(16, "Numbers Only!", "Please enter numbers only.") If $a < 0 Or @error Then MsgBox(16, "Error!", "Invalid value.") Until $a > 0 And Not @error Do $b = InputBox("Side B", "Length of side B (cm)", "Numbers Only") If @error = 1 Then Exit If StringIsAlpha($B) Then MsgBox(16, "Numbers Only!", "Please enter numbers only.") If $b < 0 Or @error Then MsgBox(16, "Error!", "Invalid value.") Until $b > 0 And Not @error SoundPlay(@WindowsDir & "\media\tada.wav") MsgBox(64, "Area and Perimeter", "Area: " & $a * $b & " cm²" & @CRLF & "Perimeter: " & (2 * $a) + (2 * $B) & " cm")
  4. I want to check if only numbers are entered.
  5. Except of the preview post I want to say that if there is an error (e.g. at the first side [A]) the script will continue to the side B without asking again the side. Here is when we need Go To command... What can I do for that?
  6. My only problem is that I can not an error when value contains letters.. $a = InputBox("Side A", "Length of side A (cm)") If $a<0 Or @error Then MsgBox(16, "Error!", "Invalid value") $b = InputBox("Side B", "Length of side B (cm)") If $b<0 Or @error Then MsgBox(16, "Error!", "Invalid value") MsgBox(64, "Area and Perimeter", "Area: " & $a*$b & " cm²" & @CRLF & "Perimeter: " & (2*$a)+(2*$B) & " cm")
  7. I still can't figure it out. Here is my source: $a = InputBox("Side A", "Length of side A (cm)") If $a<0 Or @error Then MsgBox(16, "Error!", "Invalid value") $b = InputBox("Side B", "Length of side B (cm)") If $b<0 Or @error Then MsgBox(16, "Error!", "Invalid value") MsgBox(64, "Area and Perimeter", "Area: " & $a*$b & " cm²" & @CRLF & "Perimeter: " & (2*$a)+(2*$B) & " cm") EDIT: 1) I can't use isNumber(). I tried but I can't do it. 2) I maked a do-until loop but loops and even when I type a number.. 3) Any help?
  8. At school we are learning algorithm, which I know what is. He gave us (the teacher) some examples of algorithms and I bet with him that if I make a program with a specific algorithm (from the examples), I will get A! The algorithm calculates the area and the perimeter of a (2D) square/box and the algorithm is: 1) Read A (first side) 2) Read B (second side) 3) Calculate A*B 4) Calculate 2A+2B 5) Print area & perimeter Here is what I tried: $a = InputBox("Side A", "Length of side A (cm)") If @error Then MsgBox(16, "Error!", "Invalid value") $b = InputBox("Side B", "Length of side B (cm)") If @error Then MsgBox(16, "Error!", "Invalid value") MsgBox(64, "Area and Perimeter", "Area: " & $a*$b & "cm²" & @CRLF & "Perimeter: " & (2*$a)+(2*$B) & "cm")But it is not complete. That it misses is: 1) If @error then show msgbox BUT go to the first step again. (ask for side A lenght) 2) The same problem with the up one but if it happens to the second inputbox, which asks for side B lenght. 3) If the entered value isl letters (a, b, c, etc...) instead of numbers show msgbox and ask for side lenght again 4) And the last I can think is if the value is >0 (I can do this) Can you help me finish it? Did I forgot something? Are these very noob questions?
  9. You guys answered many of my questions. What's the problem now?
  10. Already to the 3rd page..
  11. I will check it when I go home and see if it is working. Thank you anyway.
  12. Well, I tried this: $s_SmtpServer = GUICtrlRead($in_smtp) $s_FromName = "E-MaiL" $s_FromAddress = GUICtrlRead($in_from) $s_ToAddress = GUICtrlRead($in_to) $s_Subject = GUICtrlRead($in_subject) $as_Body = StringSplit(GUICtrlRead($in_text), @CRLF) $as_Body[0] = "" $smtp = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) In the window input (for the text), I typed: line 1 line 2 line 3 The email sent and there was and text but the text look like: line 1 line 2 line 3
  13. Any better solution?
×
×
  • Create New...