Bildirim
Basit kodlama hakkında yardım
Daha Fazla
Bu Konudaki Kullanıcılar:
Daha Az
1 Misafir - 1 Masaüstü
Giriş
Mesaj
-
-
otomatik seçili yer dediğin başka bir pencere mi öyleyse sendkeys konusunu araştır -
-
power shell scripti hesap makinesi için test ettim çaışıyor metni ps1 uzantılı olarak kaydet powershell scriptlerine izin vermen gerekir çalışması için keydi uygulamanın exesini yazarsın calc yerine ve açık olsun hem uygulama hem şansın
Add-Type -AssemblyName PresentationFramework
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class SFW {
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetForegroundWindow(IntPtr hWnd);
}
"@
[xml]$XAML = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="Window"
Title="Uygulama"
Width="128" Height="96" ResizeMode="NoResize" Topmost="True">
<Grid x:Name="LayoutRoot">
<UniformGrid Columns="2" Rows="2">
<Button x:Name="btn1" Content="8691"></Button>
<Button x:Name="btn2" Content="8692"></Button>
<Button x:Name="btn3" Content="8693"></Button>
<Button x:Name="btn4" Content="8694"></Button>
</UniformGrid>
</Grid>
</Window>
"@
$reader=(New-Object System.Xml.XmlNodeReader $xaml)
$Window=[Windows.Markup.XamlReader]::Load( $reader )
$btn1 = $window.FindName("btn1")
$btn2 = $window.FindName("btn2")
$btn3 = $window.FindName("btn3")
$btn4 = $window.FindName("btn4")
$process =(get-process calc)
if ($process -eq $null)
{
[System.Windows.MessageBox]::Show('Uygulama Açık Değil')
return
}
$handle=$process.MainWindowHandle
$btn1.Add_Click({
[SFW]::SetForegroundWindow($handle)
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait($btn1.Content)
[System.Windows.Forms.SendKeys]::SendWait({ENTER})
})
$btn2.Add_Click({
[SFW]::SetForegroundWindow($handle)
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait($btn2.Content)
[System.Windows.Forms.SendKeys]::SendWait({ENTER})
})
$btn3.Add_Click({
[SFW]::SetForegroundWindow($handle)
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait($btn3.Content)
[System.Windows.Forms.SendKeys]::SendWait({ENTER})
})
$btn4.Add_Click({
[SFW]::SetForegroundWindow($handle)
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait($btn4.Content)
[System.Windows.Forms.SendKeys]::SendWait({ENTER})
})
$Window.ShowDialog()
< Bu mesaj bu kişi tarafından değiştirildi Gökşen PASLI -- 1 Mart 2020; 15:49:13 >
Sayfa:
1
Ip işlemleri
Bu mesaj IP'si ile atılan mesajları ara Bu kullanıcının son IP'si ile atılan mesajları ara Bu mesaj IP'si ile kullanıcı ara Bu kullanıcının son IP'si ile kullanıcı ara
KAPAT X
Bu mesaj IP'si ile atılan mesajları ara Bu kullanıcının son IP'si ile atılan mesajları ara Bu mesaj IP'si ile kullanıcı ara Bu kullanıcının son IP'si ile kullanıcı ara
KAPAT X