Announcement

Collapse
No announcement yet.

Suggestion for auto switching login in iGNative

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion for auto switching login in iGNative

    I made this post in the FAQ thread but just realized I should put it here instead to keep the FAQ thread clean.

    lastscreenswitchtime= [0-30] Time in second to stay in GPS screen when autoswitching to GPS. [5-30] After that x seconds, auto switch back to previous screen. [0-4] disable the feature meaning that you have to manually switch to whatever screen you want.
    I have a question on this one. Why can't you have the code simply switch the screen back when the Guidance Screen (AfxWnd42s1) goes away?

    Here's the code I used in iGMon (AutoIt).

    Code:
    $blnOnGuidance = false
    $blnWasIGVisible = false
    while (true)
    	;check to see if we're on an iGuidance skin
    	$blnIGVisible = BitAnd(WinGetState($iGuidanceWindowName, ""), 2)  
    
    	;check to see if the Guidance Screen comes up
    	$blnOnGuidanceScreen = (ControlGetHandle($iGuidanceWindowName, "", "Guidance") <> "") or  (ControlGetHandle($iGuidanceWindowName, "", "AfxWnd42s1") <> "")
    
    		If $blnOnGuidanceScreen Then
    
    			If (not $blnOnGuidance) then 
    				If (not $blnIGVisible))Then
    					SwitchToIguidance() ;by executing RR command "GPS"
    				Endif
    				$blnWasIGVisible = $blnIGVisible
    			EndIf
    			$blnOnGuidance = true
    		Else
    			If $blnOnGuidance Then 
    				If ($blnIGVisible and not $blnWasIGVisible))Then
    					SwitchBack()   ;by executing RR command "EXIT"
    				EndIf
    			EndIf
    			$blnOnGuidance = false		
    		EndIf
    
    WEnd
    Extra caution is taken to make sure we only switch back (EXIT) when all these conditions are true
    1. The Guidance Screen is NOT visible
    2. We WERE on the Guidance Screen before
    3. We are still on an iGuidance skin (external_gps.skin or external_gps_full.skin)
    4. We were NOT on an iGuidance skin before the auto switch occurred.
    iGMon - Integration between iGuidance and Road Runner
    CFX - Skin for Road Runner
Working...
X