Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/13/2012 in all areas

  1. IniRead() anyone? #cs [FileVersion] #ce #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Fileversion=1.0.0.2 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(0, "Version:", _GetVersion()) Func _GetVersion() If @Compiled Then Return FileGetVersion(@AutoItExe) Else Return IniRead(@ScriptFullPath, "FileVersion", "#AutoIt3Wrapper_Res_Fileversion", "0.0.0.0") EndIf EndFunc
    1 point
  2. Kinda messy....but just an idea. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=test.exe #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Comment=test #AutoIt3Wrapper_Res_Fileversion=1.0.0.2 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** If @Compiled = 1 Then ;filegetversion... $ver = FileGetVersion(@ScriptFullPath) MsgBox(0, "Version", "Version " & $ver) Else $file = FileOpen(@ScriptFullPath, 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 Local $line = FileReadLine($file) If @error = -1 Then ExitLoop If StringInStr($line, "#AutoIt3Wrapper_Res_Fileversion=") Then $ver = StringRight($line, 7) MsgBox(0, "Version", "Version " & $ver) ExitLoop EndIf ;MsgBox(0, "Line read:", $line) WEnd FileClose($file) EndIf
    1 point
  3. If you must use multiple scripts. Compile the script files to A3x, use FileInstall, and then use the RunWait. By using A3X, you take care of all your dependencies. Switch @OSVersion Case "WIN_7" FileInstall("Script1.a3x", @ScriptDir & "", 1) RunWait(@AutoItExe & " Script1.a3x", '', @SW_HIDE) Case "WIN_XP" FileInstall("Script2.a3x", @ScriptDir & "", 1) RunWait(@AutoItExe & " Script2.a3x", '', @SW_HIDE) EndSwitch Adam
    1 point
  4. The beta version of AutoIt supports NULL, the release version does not.
    1 point
  5. What happens when you select the options manually? You could also look at the $f_fireEvent option for IEFormElementOptionselect, see if that prevents the options from resetting.
    1 point
  6. When you post please use the post editor to put your code in a codebox. The "A" button on the second row or "<>" for other code. That way it'll have syntax highlighting.
    1 point
  7. Bring on a new developer. Ask that new developer to change things, fix things and implement new things. Change/fix/implement new things myself.
    1 point
  8. I see what you're saying now, simple fix. Change every instance of $Temps in the calculations to $Temps_km and it works out correctly. It just so happened that the distance figure he used in his example made the calculations the same for either variable. Here's the updated script using the correct figures. $Distance = 10000 $Heures = 1 $Minutes = 60 $Secondes = 65 ; Calcul du temps en secondes : $Temps = (($Heures * 3600) + ($Minutes * 60) + $Secondes); Calcul de la vitesse en km/h : $Vitesse = Round((($Distance / $Temps) * 3.6), 1) ; Calcul du temps au km : Temps = Distance / vitesse ; Calcul du temps au km : Temps = Distance / vitesse $Temps_km = (1000 * $Temps) / $Distance ; Temps en secondes $Temps_km_h = Int($Temps_km / 3600) ; OK $Temps_km_m = Int(($Temps_km - ($Temps_km_h * 3600)) / 60) $Temps_km_s = Int(($Temps_km - ($Temps_km_h * 3600) - ($Temps_km_m * 60))) ConsoleWrite("Temps ensecondes : " & $Temps & @CRLF & "Vitesse en km/h : " & $Vitesse & @CRLF & "Temps au km : " & $Temps_km_h & " h " & $Temps_km_m & " m " &$Temps_km_s & " s" & @CRLF) Also, yes it would be much simpler to read it if you use variables to hold the intermediate calculations, but the results are the same.
    1 point
×
×
  • Create New...