17/12/31 14:07:19.48 OtsgdoEl.net
>>920
下記のような Profile を組めばよい.
A6 は切り替わった瞬間に実行される.
Task からは %VPN を見ればよい.
Profile: VPN状態確認 (9)
Enforce: no
Event: Intent Received [ Action:android.net.conn.CONNECTIVITY_CHANGE Cat:None Cat:None Scheme:* Mime Type:* ]
Enter: Anon (109)
Abort Existing Task
A1: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
A2: Java Function [ Return:(ConnectivityManager)cm Class Or Object:CONTEXT Function:getSystemService
{Object} (String) Param:connectivity Param: Param: Param: Param: Param: Param: ]
A3: Java Function [ Return:ni Class Or Object:cm Function:getNetworkInfo
{NetworkInfo} (int) Param:17 Param: Param: Param: Param: Param: Param: ]
A4: Java Function [ Return:%vpn Class Or Object:ni Function:isConnectedOrConnecting
{boolean} () Param: Param: Param: Param: Param: Param: Param: ]
A5: If [ %VPN neq %vpn ]
A6: Flash [ Text:VPN: %vpn Long:Off ]
A7: End If
A8: Variable Set [ Name:%VPN To:%vpn Recurse Variables:Off Do Maths:Off Append:Off ]