Показать сообщение отдельно
Старый 29.08.2015, 08:20   #130
Krysanov
Super Moderator
 
Аватар для Krysanov
 
Регистрация: 12.11.2013
Возраст: 45
Город: Горно-Алтайск
Регион: 04
Машина: lexus rx300
Сообщений: 3,145
Krysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to beholdKrysanov is a splendid one to behold
По умолчанию

seriousstas, попробовал, что ты посоветовал..
Вот что получилось

Код:
#pragma compile(Icon, "C:\Program Files (x86)\AutoIt3\Icons\au3script_v9.ico")
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Run_AU3Check=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WindowsConstants.au3>
Local $omyerror
$omyerror = ObjEvent("AutoIt.Error", "MyErrFunc")
Dim $vol_from_speed[201]
Global $rr = ObjCreate("RideRunner.sdk")
_main()

Func myerrfunc()
	$hexnumber = Hex($omyerror.number, 8)
	Exit
EndFunc

Func _initvolarray()
	$delta = 0
	$vol_from_speed[0] = $delta
	For $i = 0 To 150 Step 10
		$tmp_vol_from_speed = $rr.getinfo("=$vol_from_speed_" & $i + 10 & "$") / 10
		For $j = 1 To 10 Step 1
			$delta = $delta + $tmp_vol_from_speed
			$vol_from_speed[$i + $j] = Round($delta, 2)
		Next
	Next
	For $i = 162 To 200 Step 1
		$delta = $delta + $tmp_vol_from_speed
		$vol_from_speed[$i] = Round($delta, 2)
	Next
EndFunc

Func _main()
	Global $iswork = 1
	Global $isrun = 0
	Global $name = "[CLASS:TSkinForm]"
	Global $namecontrol = ""
	Global $foobarwindowtitleprev = ""
	Global $speed_prev = Round(Number($rr.getinfo("$IsDriveSpd$")), 0)
	Global $speed_prev_round = Round($speed_prev, -1)
	Global $vol_from_speed_full = 0
	Global $vol_min = Number($rr.getinfo("=$vol_from_speed_min$"))
	Global $vol_max = Number($rr.getinfo("=$vol_from_speed_max$"))
	_initvolarray()
	$rr.execute("SetVar;vol_from_speed_full;" & Round($vol_from_speed[$speed_prev], 2))
	While $iswork
		$handle = WinGetHandle($name)
		If @error Then
			If $isrun Then
				$iswork = 0
			EndIf
		Else
			$isrun = 1
			If WinActive($name) OR WinActive("[CLASS:TOverlayForm]") OR WinActive("[CLASS:TPopupSkinForm]") OR WinActive("[CLASS:TModalSkinForm]") OR WinActive("[CLASS:TMediaForm]") Then
				$rr.execute("SETIND;!iCarDS_Active;ON")
			Else
				$rr.execute("SETIND;!iCarDS_Active;OFF")
			EndIf
		EndIf
		$volume = StringSplit($rr.getinfo("VOLUME"), "%")
		If @error = 0 Then
			$current_volume = Number($volume[1])
		Else
			$current_volume = 0
		EndIf
		$speed_current = Round(Number($rr.getinfo("$IsDriveSpd$")), 0)
		If $speed_current > $speed_prev Then
			$delta_vol = Round($vol_from_speed[$speed_current] - $vol_from_speed[$speed_prev], 2)
			If $current_volume + $delta_vol < $vol_max Then $rr.execute("volperc+;" & $delta_vol & "||SetVar;vol_from_speed_full;" & $vol_from_speed[$speed_current])
		Else
			If $speed_current < $speed_prev Then
				$delta_vol = Round($vol_from_speed[$speed_prev] - $vol_from_speed[$speed_current], 2)
				If $current_volume - $delta_vol > $vol_min Then $rr.execute("volperc-;" & $delta_vol & "||SetVar;vol_from_speed_full;" & $vol_from_speed[$speed_current])
			EndIf
		EndIf
		$speed_prev = $speed_current
		If Number($rr.getinfo("=$Is_new_vol_from_speed$")) = 1 Then
			_initvolarray()
			$rr.execute("SetVar;Is_new_vol_from_speed;0")
		EndIf
		Sleep(300)
	WEnd
EndFunc
; Это команда на сон
Global $PBT_APMSUSPEND = 0x0004
Global $PBT_APMRESUMESUSPEND = 0x0007

$hGUI = GUICreate("Restart", 100, 100, 1, 1)
GUIRegisterMsg($WM_POWERBROADCAST, "Standby")

 ; Запускаем GpsGate
    ShellExecute("C:\Program Files (x86)\Franson\GpsGate 2.0\GpsGateXP.exe")

; Запускаем iCarDS
ShellExecute("C:\Program Files (x86)\TipTop software\iCar DS\iCarDS.exe")

; Запускаем Bluestacks вместе с лаунчером MyLauncher
	$Bluestacks_path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Bluestacks", "InstallDir")
	ShellExecute($Bluestacks_path & "HD-RunApp.exe", "-p ru.znalexey.mylauncher -a ru.znalexey.mylauncher.LauncherActivity")

	; Запускаем программу по коннекту интернета (У кого нет такой программы, тогда эту и следующие строки удалить!)
    ShellExecute("C:\Program Files (x86)\SP Dialer\SP Dialer.exe")

While 1
    Sleep(100)
WEnd

Func Standby($hWnd, $Msg, $wParam, $lParam)
    Select
        ; Вход в спящий режим
        Case $wParam = $PBT_APMSUSPEND
            Suspend()
        ; Выход из спящего режима
        Case $wParam = $PBT_APMRESUMESUSPEND
            ResumeSuspend()
        Case Else
    EndSelect
EndFunc

; Вход в спящий режим
Func Suspend()

    ; Закрываем iCarDS
    WinClose("iCar DS")

    ; Закрываем программу по коннекту интернета
    ProcessClose("SP Dialer.exe")

    ; Закрываем GpsGate
    WinClose("Franson GpsGate")

	;Закрываем Блюстак
	 ShellExecute("C:\Program Files (x86)\BlueStacks\HD-Quit.exe")

   If (ProcessWaitClose("iCarDS.exe", 3) == 0) Then
        ProcessClose("iCarDS.exe")
   EndIf
    If (ProcessWaitClose("SP Dialer.exe", 3) == 0) Then
        ProcessClose("SP Dialer.exe")
   EndIf

   If (ProcessWaitClose("HD-Frontend.exe", 3) == 0) Then
    ProcessClose("HD-Frontend.exe")
   EndIf

EndFunc

; Выход из спящего режима
Func ResumeSuspend()

    ; Запускаем GpsGate
    ShellExecute("C:\Program Files (x86)\Franson\GpsGate 2.0\GpsGateXP.exe")

    ; Запускаем программу по коннекту интернета
    ShellExecute("C:\Program Files (x86)\SP Dialer\SP Dialer.exe")

	; Запускаем Bluestacks вместе с лаунчером MyLauncher
	$Bluestacks_path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Bluestacks", "InstallDir")
	ShellExecute($Bluestacks_path & "HD-RunApp.exe", "-p ru.znalexey.mylauncher -a ru.znalexey.mylauncher.LauncherActivity")


    ; Запускаем iCarDS
    ShellExecute("C:\Program Files (x86)\TipTop software\iCar DS\iCarDS.exe")

EndFunc
В автозагруке был только этот скрипт, который отключил (он у меня при включении компа все загружал)... и GpsGateWatcher скрипт...Потом заменил iCarMainScript на свой.... и перезагрузил комп... и тишина.. икар не загрузился...
__________________
Windows 8.1, 64 бит, iCar DS 1.7.0.60
LGA 1155 Intel(R) Core(TM) i5-3570 CPU @ 3,4 GHz (6 Mb), 2x DDRIII 4Gb 1333 MHz KINGMAX, ASRock IntelB75, VGA (DVI+HDMI)+PCX16 3,0, SSD TOSHIBA OCZ tr150 на 240 GB, 2,5 Samsung SATA 1 Tb 5400 rpm, 8Mb, M4-atx -hv
Проект Кристалл-М=многоканальный звук в Lexus rx300 на базе CarPC!
Установка Windows, iCarDS и всего, что необходимо для CarPC!
_________________________________________


Последний раз редактировалось Krysanov; 29.08.2015 в 08:57.
Krysanov вне форума   Ответить с цитированием