FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» select intégrés
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar jjn4 Hier à 18:33

» Aide de PANORAMIC
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar leclode Hier à 18:23

» PANORAMIC V 1
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Klaus Hier à 9:53

» Je teste PANORAMIC V 1 beta 1
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Klaus Hier à 9:52

» bouton dans autre form que 0
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Klaus Lun 6 Mai 2024 - 11:41

» Gestion d'un système client-serveur.
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Klaus Lun 6 Mai 2024 - 10:23

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Froggy One Jeu 2 Mai 2024 - 11:16

» @Jack
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar Jack Mar 30 Avr 2024 - 20:40

» trop de fichiers en cours
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar papydall Lun 29 Avr 2024 - 23:39

» Une calculatrice en une ligne de programme
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar jean_debord Dim 28 Avr 2024 - 8:47

» Form(résolu)
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar leclode Sam 27 Avr 2024 - 17:59

» Bataille navale SM
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar jjn4 Ven 26 Avr 2024 - 17:39

» Les maths du crocodile
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar jean_debord Jeu 25 Avr 2024 - 10:37

» Naissance de Crocodile Basic
touche - Simuler l’appui d'une touche ou combinaison de touches.  Emptypar jean_debord Jeu 25 Avr 2024 - 8:45

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment : -20%
Ecran PC GIGABYTE 28″ LED M28U 4K ( IPS, 1 ms, ...
Voir le deal
399 €

 

 Simuler l’appui d'une touche ou combinaison de touches.

Aller en bas 
4 participants
AuteurMessage
papydall

papydall


Nombre de messages : 7004
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyMer 23 Aoû 2017 - 22:54

Tout est dans le code.
Il n'y a rien à ajouter !  Wink

Code:

rem ============================================================================
rem                  SimulerAppuiTouche
rem                     Par Papydall
rem ============================================================================
REM Simuler l’appui de n’importe quelle touche.
rem Le nombre passé en paramètre correspond au KeyCode de la touche à simuler
rem (par exemple, 44 pour  "imprime écran", 20 pour "capslock")
rem ============================================================================
REM Pour connaitre les codes des touches à envoyer, utilisez le menu "Outils"
rem de Panoramic_Editor, sous-menu "Code des Touches"
rem ============================================================================
Init()
' Simulation de click sur bouton
for i = 97 to 100 : ' code touches 1..4 du panneau numérique
    Appui_touche(i) : pause 1000 : ' Pour simuler l'appui sur les touches 1,2,3,4
next i
pause 1000
Appui_touche(20) : message "Votre PC est en mode capslock"      : ' Pour simuler capslock
Appui_touche(44) : message "La touche impr-ecran a été appuyée" : ' Pour simuler impr-ecran
MESSAGE "Pour vous en convaincre, ouvrez PSPAINT.EXE et faites CRTL + v"
TERMINATE
end
rem ============================================================================
SUB Init()
   label click
   dim i
   for i = 1 to 4
       button i : top i,50 : left i, 10+100*i
       caption i,"Bouton&" + str$(i) : on_click i,click
   next i
END_SUB
rem ============================================================================
Click:
   select number_click
       case 1 : message "Bouton1 cliqué"
       case 2 : message "Bouton2 cliqué"
       case 3 : message "Bouton3 cliqué"
       case 4 : message "Bouton4 cliqué"
   end_select
return  
rem ============================================================================
' bVk% : code de la touche à simuler
' Les autres paramètres (bScan%,dwFlags%,dwExtraInfo%) sont à 0 (zéro)
SUB Keybd(bVk%,bScan%,dwFlags%,dwExtraInfo%)
   dim_local ret%
   dll_on "user32"
   ret% = dll_call4("keybd_event",bVk%,bScan%,dwFlags%,dwExtraInfo%)
   dll_off
END_SUB
rem ============================================================================
SUB Appui_Touche(t%)
   Keybd(t%,0,0,0)
END_SUB
rem ============================================================================


Dernière édition par papydall le Dim 27 Aoû 2017 - 6:44, édité 1 fois (Raison : Modification du titre du sujet)
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
Pedro

Pedro


Nombre de messages : 1555
Date d'inscription : 19/01/2014

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Simuler l’appui de n’importe quelle touche.   touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptySam 26 Aoû 2017 - 16:25

Bonjour à tous.

J'aimerais connaître le moyen de simuler un CTRC-A, ou un CTRL-C, via cette méthode.
Merci.
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 7004
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyDim 27 Aoû 2017 - 6:37

Après avoir longuement discuté avec mon ami GOOGLE, je partage avec vous mon savoir fraîchement acquis.  Smile

Il est tout à fait possible de simuler n’importe quelle touche ou combinaison de touches.
Le code suivant (qui est parfaitement documenté) montre 4 exemples de simulation.
1 / Simulation de ALT + TAB
2 / Simulation de CTRL + A  <--- Tout sélectionner
3 / Simulation de CTRL + C <--- Copier la sélection dans le presse-papier
4 / Simulation de CTRL + R <--- Rechercher et Remplacer


Code:

rem ============================================================================
rem           Keyboard Events Simulation using keybd_event() function
rem                            By  Papydall
rem                            27 / 08 2017
rem ============================================================================
rem Syntax :
rem             Keybd(bVk%, bScan%, dwFlags%, dwExtraInfo%)
rem Parameters :
rem bVK%         : Virtual Keycode of keys. E.g., VK_RETURN, VK_TAB…
rem bScan%       : Scan Code value of keys. E.g., hex("B8") for “Left Alt” key.
rem dwFlag%      : Flag that is set for key state. E.g., KEYEVENTF_KEYUP.
rem dwExtraInfo% : 32-bit extra information about keystroke.
rem ============================================================================

Constantes()

rem ============================================================================
' Exemples d’utilisation
' 1 / Simulation de ALT + TAB
Keybd(VK_MENU,hex("B8"),0,0) : ' ALT Press
Keybd(VK_TAB, hex("8F"),0,0) : ' TAB press
pause 2000 : ' Temporisation pour observer le changement
Keybd(VK_TAB, hex("8F"), KEYEVENTF_KEYUP,0) : ' Tab Release
Keybd(VK_MENU,hex("B8"), KEYEVENTF_KEYUP,0) : ' Alt Release
rem ============================================================================
' 2 / Simulation de CTRL + A  <--- Tout sélectionner
Keybd(VK_CONTROL,hex("9D"),0 , 0)             : ' Ctrl Press
Keybd(VK_A, hex("9E"),0 , 0)                  : ' ‘A’ Press
Keybd(VK_A, hex("9E"), KEYEVENTF_KEYUP,0)     : ' ‘A’ Release
Keybd(VK_CONTROL,hex("9D"),KEYEVENTF_KEYUP,0) : ' Ctrl Release
rem ============================================================================
' 3 / Simulation de CTRL + C <--- Copier la sélection dans le presse-papier
Keybd(VK_CONTROL,hex("9D"),0 , 0)             : ' Ctrl Press
Keybd(VK_C,hex("9E"),0 , 0)                   : ' ‘C’ Press
Keybd(VK_C,hex("9E"), KEYEVENTF_KEYUP,0)      : ' ‘C’ Release
Keybd(VK_CONTROL,hex("9D"),KEYEVENTF_KEYUP,0) : ' Ctrl Release
rem ============================================================================
' 4 / Simulation de CTRL + R <--- Rechercher et Remplacer
Keybd(VK_CONTROL,hex("9D"),0 , 0)             : ' Ctrl Press
Keybd(VK_R,hex("9E"),0 , 0)                   : ' ‘R’ Press
Keybd(VK_R,hex("9E"), KEYEVENTF_KEYUP,0)      : ' ‘R’ Release
Keybd(VK_CONTROL,hex("9D"),KEYEVENTF_KEYUP,0) : ' Ctrl Release

rem ============================================================================
end
rem ============================================================================
' Code virtuel de la touche
SUB Constantes()
' ------------------------------------------------------------------------------
    dim VK_LBUTTON : VK_LBUTTON = hex("01") : ' Left mouse button
    dim VK_RBUTTON : VK_RBUTTON = hex("02") : ' Right mouse button
    dim VK_CANCEL  : VK_CANCEL  = hex("03") : ' Control-break processing
    dim VK_MBUTTON : VK_MBUTTON = hex("04") : ' Middle mouse button (three-button mouse)
' ------------------------------------------------------------------------------
    dim VK_BACK    : VK_BACK    = hex("08") : ' BACKSPACE key
    dim VK_TAB     : VK_TAB     = hex("09") : ' TAB key
    dim VK_CLEAR   : VK_CLEAR   = hex("0C") : ' CLEAR key
    dim VK_RETURN  : VK_RETURN  = hex("0D") : ' ENTER key
    dim VK_SHIFT   : VK_SHIFT   = hex("10") : ' SHIFT key
    dim VK_CONTROL : VK_CONTROL = hex("11") : ' CTRL key
    dim VK_MENU    : VK_MENU    = hex("12") : ' ALT key
    dim VK_PAUSE   : VK_PAUSE   = hex("13") : ' PAUSE key
    dim VK_CAPITAL : VK_CAPITAL = hex("14") : ' CAPS LOCK key
    dim VK_ESCAPE  : VK_ESCAPE  = hex("1B") : ' ESC key
    dim VK_SPACE   : VK_SPACE   = hex("20") : ' SPACEBAR
    dim VK_PRIOR   : VK_PRIOR   = hex("21") : ' PAGE UP key
    dim VK_NEXT    : VK_NEXT    = hex("22") : ' PAGE DOWN key
    dim VK_END     : VK_END     = hex("23") : ' END key
    dim VK_HOME    : VK_HOME    = hex("24") : ' HOME key
    dim VK_LEFT    : VK_LEFT    = hex("25") : ' LEFT ARROW key
    dim VK_UP      : VK_UP      = hex("26") : ' UP ARROW key
    dim VK_RIGHT   : VK_RIGHT   = hex("27") : ' RIGHT ARROW key
    dim VK_DOWN    : VK_DOWN    = hex("28") : ' DOWN ARROW key
    dim VK_SELECT  : VK_SELECT  = hex("29") : ' SELECT key
    dim VK_EXECUTE : VK_EXECUTE = hex("2B") : ' EXECUTE key
    dim VK_SNAPSHOT: VK_SNAPSHOT= hex("2C") : ' PRINT SCREEN key
    dim VK_INSERT  : VK_INSERT  = hex("2D") : ' INS key
    dim VK_DELETE  : VK_DELETE  = hex("2E") : ' DEL key
    dim VK_HELP    : VK_HELP    = hex("2F") : ' HELP key
' ------------------------------------------------------------------------------
    dim VK_0       : VK_0       = hex("30") : ' 0 key
    dim VK_1       : VK_1       = hex("31") : ' 1 key
    dim VK_2       : VK_2       = hex("32") : ' 2 key
    dim VK_3       : VK_3       = hex("33") : ' 3 key
    dim VK_4       : VK_4       = hex("34") : ' 4 key
    dim VK_5       : VK_5       = hex("35") : ' 5 key
    dim VK_6       : VK_6       = hex("36") : ' 6 key
    dim VK_7       : VK_7       = hex("37") : ' 7 key
    dim VK_8       : VK_8       = hex("38") : ' 8 key
    dim VK_9       : VK_9       = hex("39") : ' 9 key
' ------------------------------------------------------------------------------
    dim VK_A       : VK_A       = hex("41") : ' A key
    dim VK_B       : VK_B       = hex("42") : ' B key
    dim VK_C       : VK_C       = hex("43") : ' C key
    dim VK_D       : VK_D       = hex("44") : ' D key
    dim VK_E       : VK_E       = hex("45") : ' E key
    dim VK_F       : VK_F       = hex("46") : ' F key
    dim VK_G       : VK_G       = hex("47") : ' G key
    dim VK_H       : VK_H       = hex("48") : ' H key
    dim VK_I       : VK_I       = hex("49") : ' I key
    dim VK_J       : VK_J       = hex("4A") : ' J key
    dim VK_K       : VK_K       = hex("4B") : ' K key
    dim VK_L       : VK_L       = hex("4C") : ' L key
    dim VK_M       : VK_M       = hex("4D") : ' M key
    dim VK_N       : VK_N       = hex("4E") : ' N key
    dim VK_O       : VK_O       = hex("4F") : ' O key
    dim VK_P       : VK_P       = hex("50") : ' P key
    dim VK_Q       : VK_Q       = hex("51") : ' Q key
    dim VK_R       : VK_R       = hex("52") : ' R key
    dim VK_S       : VK_S       = hex("53") : ' S key
    dim VK_T       : VK_T       = hex("54") : ' T key
    dim VK_U       : VK_U       = hex("55") : ' U key
    dim VK_V       : VK_V       = hex("56") : ' V key
    dim VK_W       : VK_W       = hex("57") : ' W key
    dim VK_X       : VK_X       = hex("58") : ' X key
    dim VK_Y       : VK_Y       = hex("59") : ' Y key
    dim VK_Z       : VK_Z       = hex("5A") : ' Z key
' ------------------------------------------------------------------------------
    dim VK_LWIN    : VK_LWIN    = hex("5B") : ' Left Windows key (Microsoft Natural Keyboard)
    dim VK_RWIN    : VK_RWIN    = hex("5C") : ' Right Windows key (Microsoft Natural Keyboard)
    dim VK_APPS    : VK_APPS    = hex("5D") : ' Applications key (Microsoft Natural Keyboard)
' ------------------------------------------------------------------------------
    dim VK_NUMPAD0 : VK_NUMPAD0 = hex("60") : ' Numeric keypad 0 key
    dim VK_NUMPAD1 : VK_NUMPAD1 = hex("61") : ' Numeric keypad 1 key
    dim VK_NUMPAD2 : VK_NUMPAD2 = hex("62") : ' Numeric keypad 2 key
    dim VK_NUMPAD3 : VK_NUMPAD3 = hex("63") : ' Numeric keypad 3 key
    dim VK_NUMPAD4 : VK_NUMPAD4 = hex("64") : ' Numeric keypad 4 key
    dim VK_NUMPAD5 : VK_NUMPAD5 = hex("65") : ' Numeric keypad 5 key
    dim VK_NUMPAD6 : VK_NUMPAD6 = hex("66") : ' Numeric keypad 6 key
    dim VK_NUMPAD7 : VK_NUMPAD7 = hex("67") : ' Numeric keypad 7 key
    dim VK_NUMPAD8 : VK_NUMPAD8 = hex("68") : ' Numeric keypad 8 key
    dim VK_NUMPAD9 : VK_NUMPAD9 = hex("69") : ' Numeric keypad 9 key
' ------------------------------------------------------------------------------
    dim VK_MULTIPLY  : VK_MULTIPLY  = hex("6A") : ' Multiply key
    dim VK_ADD       : VK_ADD       = hex("6B") : ' Add key
    dim VK_SEPARATOR : VK_SEPARATOR = hex("6C") : ' Separator key
    dim VK_SUBTRACT  : VK_SUBTRACT  = hex("6D") : ' Subtract key
    dim VK_DECIMAL   : VK_DECIMAL   = hex("6E") : ' Decimal key
    dim VK_DIVIDE    : VK_DIVIDE    = hex("6F") : ' Divide key
' ------------------------------------------------------------------------------
    dim VK_F1  : VK_F1  = hex("70") : ' F1 key
    dim VK_F2  : VK_F2  = hex("71") : ' F2 key
    dim VK_F3  : VK_F3  = hex("72") : ' F3 key
    dim VK_F4  : VK_F4  = hex("73") : ' F4 key
    dim VK_F5  : VK_F5  = hex("74") : ' F5 key
    dim VK_F6  : VK_F6  = hex("75") : ' F6 key
    dim VK_F7  : VK_F7  = hex("76") : ' F7 key
    dim VK_F8  : VK_F8  = hex("77") : ' F8 key
    dim VK_F9  : VK_F9  = hex("78") : ' F9 key
    dim VK_F10 : VK_F10 = hex("79") : ' F10 key
    dim VK_F11 : VK_F11 = hex("7A") : ' F11 key
    dim VK_F12 : VK_F12 = hex("7B") : ' F12 key
    dim VK_F13 : VK_F13 = hex("7C") : ' F13 key
    dim VK_F14 : VK_F14 = hex("7D") : ' F14 key
    dim VK_F15 : VK_F15 = hex("7E") : ' F15 key
    dim VK_F16 : VK_F16 = hex("7F") : ' F16 key
    dim VK_F17 : VK_F17 = hex("80") : ' F17 key
    dim VK_F18 : VK_F18 = hex("81") : ' F18 key
    dim VK_F19 : VK_F19 = hex("82") : ' F19 key
    dim VK_F20 : VK_F20 = hex("83") : ' F20 key
    dim VK_F21 : VK_F21 = hex("84") : ' F21 key
    dim VK_F22 : VK_F22 = hex("85") : ' F22 key
    dim VK_F23 : VK_F23 = hex("86") : ' F23 key
    dim VK_F24 : VK_F24 = hex("87") : ' F24 key
' ------------------------------------------------------------------------------
    dim VK_NUMLOCK : VK_NUMLOCK = hex("90") : ' NUM LOCK key
    dim VK_SCROLL  : VK_SCROLL  = hex("91") : ' SCROLL LOCK key
' ------------------------------------------------------------------------------
    dim KEYEVENTF_EXTENDEDKEY : KEYEVENTF_EXTENDEDKEY = hex("00") : ' Key down flag    
    dim KEYEVENTF_KEYUP       : KEYEVENTF_KEYUP       = hex("02") : ' Key up flag
    dim VK_LCONTROL           : VK_LCONTROL           = hex("A2") : ' Left Control key code
END_SUB
rem ============================================================================
' Scan code is the hardware key code for the key (make and break codes).
' The following are the available scan codes (break code will be used in this parameter).
' Les codes sont en Hexa
rem Key        Make  Break      Key   Make  Break
rem Backspace   0E    8E        F1     3B    BB
rem Caps Lock   3A    BA        F2     3C    BC
rem Enter       1C    9C        F3     3D    BD
rem ESC         01    81        F4     3E    BE
rem Left Alt    38    B8        F5     3F    BF
rem Left Ctrl   1D    9D        F6     40    C0
rem Left Shift  2A    AA        F7     41    C1
rem Num Lock    45    C5        F8     42    C2
rem Right Shift 36    B6        F9     43    C3
rem Scroll Lock 46    C6        F10    44    C4
rem Space       39    B9        F11    57    D7
rem Tab         0F    8F        F12    58    D8
' ------------------------------------------------------------------------------
rem A           1E    9E        N      31    B1
rem B           30    B0        O      18    98
rem C           2E    AE        P      19    99
rem D           20    A0        Q      10    90
rem E           12    92        R      13    93
rem F           21    A1        S      1F    9F
rem G           22    A2        T      14    94
rem H           23    A3        U      16    96
rem I           17    97        V      2F    AF
rem J           24    A4        W      11    91
rem K           25    A5        X      2D    AD
rem L           26    A6        Y      15    95
rem M           32    B2        Z      2C    AC
' ------------------------------------------------------------------------------
rem 1           02    82        -      0C    8C
rem 2           03    83        =      0D    8D
rem 3           04    84        [      1A    9A
rem 4           05    85        ]      1B    9B
rem 5           06    86        ;      27    A7
rem 6           07    87        '      28    A8
rem 7           08    88        `      29    A9
rem 8           09    89        \      28    A8
rem 9           0A    8A        ,      33    B3
rem 0           0B    8B        /      35    B5
' ------------------------------------------------------------------------------
rem Keypad Keys   Make  Break
rem Pad0(Ins)      52     D2
rem Pad1(End)      4F     CF
rem Pad2(D arrow)  50     D0
rem Pad3(PgDn)     51     D1
rem Pad4(L arrow)  4B     CB
rem Pad5           4C     CC
rem Pad6(R arrow)  4D     CD
rem Pad7(Home)     47     C7
rem Pad8(U arrow)  48     C8
rem Pad9(PgUp)     49     C9
rem Pad.(Del)      53     D3
rem Pad*           37     B7
rem Pad-           4A     CA
rem Pad+           4E     CE
rem ============================================================================
' Paramètres :
' bVK%   : Virtual keycode that has to be send as key input
' bScan% : Scan code is the hardware key code for the key (make and break codes)
' dwFlags% : A set of flag bits that specify various aspects of function operation.
' dwExtraInfo% : 32-bit extra information along with the keyboard input.
SUB Keybd(bVk%,bScan%,dwFlags%,dwExtraInfo%)
   dim_local ret%
   dll_on "user32"                                                        
   ret% = dll_call4("keybd_event",bVk%,bScan%,dwFlags%,dwExtraInfo%)
   dll_off
END_SUB
rem ============================================================================
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
pascal10000

pascal10000


Nombre de messages : 812
Localisation : Troyes
Date d'inscription : 05/02/2011

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyVen 15 Sep 2017 - 7:22

merci papydall pour ton code
si tu en a d'autre avec user32 ce sera avec plaisir
par contre évite l'anglais ça s'rai sympas de ta part!
cordialement
Revenir en haut Aller en bas
Jean Claude

Jean Claude


Nombre de messages : 5948
Age : 69
Localisation : 83 Var
Date d'inscription : 07/05/2009

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyVen 15 Sep 2017 - 9:52

Merci Papydall !

Ces 2 SUBs peuvent être très utiles, j'ai stocké dans ma réserve.

A+
Revenir en haut Aller en bas
pascal10000

pascal10000


Nombre de messages : 812
Localisation : Troyes
Date d'inscription : 05/02/2011

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyLun 18 Sep 2017 - 16:54

bjr papy


A L'AIDE:

papydall peut tu me dire pourquoi que ce sub ne fonctionne pas
c'est la simulation CRTL+A

source::

et merci pour cette information de user32 ça rend de grand service pour les racourcis
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 7004
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyLun 18 Sep 2017 - 17:51

Salut Pascal
Modifie toutes les variables que tu utilises dans l’appel : Key, Crtl, Facon, Zero, retour en les déclarant comme des entiers en y ajoutant le suffixe %.
Sinon, revois mon code en haut : l’exemple 2 qui simule CTRL + A  <--- Tout sélectionner
Elle fonctionne parfaitement.
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
pascal10000

pascal10000


Nombre de messages : 812
Localisation : Troyes
Date d'inscription : 05/02/2011

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyLun 18 Sep 2017 - 18:16

Effectivement ça fonctionne  avec le pourcentage %
comme quoi!! il ne faut pas grand chose et a ça je n'y
ai pas pensé
merci bounce
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 7004
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyLun 18 Sep 2017 - 18:26

Souviens-toi toujours :
Pour Panoramic, les paramètres à transmettre aux différentes fonctions d’une DLL, lors de son appel doivent être du type INTEGER (entier) ainsi que le résultat du retour de la fonction appelée.
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
pascal10000

pascal10000


Nombre de messages : 812
Localisation : Troyes
Date d'inscription : 05/02/2011

touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  EmptyLun 18 Sep 2017 - 18:30

encore une chose avec ton code
ne pourrait-on pas faire une include et le stocker
dans le dossier de panoramic
comme on peut voire dans d'autre logiciel

par exemple faire
C:\programme file\panoramic\include\touche_Key.inc

et de s'en servir pour tout nos source
parce que avec ton source on aura tout une panopli
comme <<coller;annuler;imprimer>> et j'en passe
Revenir en haut Aller en bas
Contenu sponsorisé





touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty
MessageSujet: Re: Simuler l’appui d'une touche ou combinaison de touches.    touche - Simuler l’appui d'une touche ou combinaison de touches.  Empty

Revenir en haut Aller en bas
 
Simuler l’appui d'une touche ou combinaison de touches.
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» interception appui clavier sur touche de Fonction
» Combinaison de touches
» CTRL+touche et ALT+touche
» Rubriques d'aide par la touche F1
» Simuler un tableau à 3 dimensions

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: